1 |
On Mon, 23 Aug 2004 20:30:41 -0400 |
2 |
Ned Ludd <solar@g.o> wrote: |
3 |
|
4 |
> On Mon, 2004-08-23 at 16:36, Natanael Copa wrote: |
5 |
> > On Mon, 23 Aug 2004 01:32:20 -0400 |
6 |
> > Ned Ludd <solar@g.o> wrote: |
7 |
> > |
8 |
> > > On Sat, 2004-08-21 at 03:12, Natanael Copa wrote: |
9 |
> > > > I think I finally got some time to continue with my uclibc |
10 |
> > > > gentoo project. |
11 |
> > > > |
12 |
> > > > As I understood it, its easiest to strat from scratch when using |
13 |
> > > > hardened. Is there any place I can get uclibc hardened stages to |
14 |
> > > > get started? |
15 |
> > > |
16 |
> > > The first generation stages were hardened ones. |
17 |
> > > |
18 |
> > > http://oc12.net/~solar/uclibc/gentoo/x86/packages |
19 |
> > > Lots of fixes have happened from this time. |
20 |
> > |
21 |
> > I browsed the dirs and found somehting called ipkg. What is that? |
22 |
> |
23 |
> It's WiKi page needs to be updated but.. |
24 |
> http://handhelds.org/moin/moin.cgi/Ipkg |
25 |
> |
26 |
> It's something I'm testing out while in the search of an ideal way of |
27 |
> embedded package management. I learned about it via the OpenWrt |
28 |
> project( http://openwrt.org ) which I also have an active interest in. |
29 |
> There is no ebuild for it at this time. |
30 |
|
31 |
It looks really interesting! We were talking about dpkg, but it is |
32 |
designed to run on disks. |
33 |
|
34 |
> Compact Flash Sub Package Management is something that has yet to |
35 |
> really be decided and or discussed in any meaningful manor.. |
36 |
> It's can go any direction that _we_ the community need/want it to go. |
37 |
> |
38 |
> This much is assumed. |
39 |
> We want to use the portage system as our package building system. |
40 |
> We don't want (perl|bash) scripts/(man|info|doc)-pages. |
41 |
|
42 |
Agree! |
43 |
|
44 |
> *.a, *.la and *.h files will be handled by another FEATURE= somewhere |
45 |
> else down the line probably in ebuild.sh so it's transparent to the |
46 |
> packages themselves. |
47 |
|
48 |
Sounds good! |
49 |
|
50 |
> But we have some questions. |
51 |
> Do we want to remove these from packages when they are still in |
52 |
> .tbz2 format? |
53 |
|
54 |
I think it would be nice to have the possibility to choose. |
55 |
|
56 |
> Do we want to use (gzip|bzip2) compression for the packages |
57 |
> themselves? |
58 |
|
59 |
I shouldn't be impossible to handle both compressed and uncompressed? |
60 |
|
61 |
> Is complying to busybox only commands a must? |
62 |
|
63 |
It would be nice, but, on the other hand, if we uses normal archives, |
64 |
like tar/tar.gz/tar.bz2 it could be possible to unpack the packages with |
65 |
busybox only commands. In bering it is possible to tar -zxf package.lrp |
66 |
and there you go. In theory, that is possible with tbz2 too. |
67 |
|
68 |
To update/remove it is not that important. |
69 |
|
70 |
> What must the package management do? |
71 |
|
72 |
As said, a minimal, simple extractor is good. |
73 |
|
74 |
I would like simple runtime dependency handling. Something like: |
75 |
|
76 |
pkg_install() { |
77 |
# chek if it needs to be downloaded etc.. |
78 |
$UNPACK $PKGSRC/$1.pkg |
79 |
source $1.metadata |
80 |
for i in $DEPENDENCIES ; do |
81 |
pkg_install $i |
82 |
done |
83 |
} |
84 |
|
85 |
Upgrade packages on the fly without needing to reboot. |
86 |
|
87 |
In case of a read-only media, somewhere to save local configs. we |
88 |
currently run from CD-ROM and store the configs on floppy. It would be |
89 |
nice to store local configuration anywhere (usb stick, network mount) |
90 |
|
91 |
pre/post-install/update/remove scripts. It would be nice to be able to |
92 |
write a small script that is included in the package to be able to run |
93 |
some code when installing/removing packages. |
94 |
|
95 |
In our current apkg I was thinking of a /var/lib/lrpkg/<package>.scripts |
96 |
that was sourced. This could contain a |
97 |
|
98 |
{pre,post}_{install,update,remove} script that is run. |
99 |
|
100 |
For example: |
101 |
|
102 |
post_update() { |
103 |
/etc/init.d/service restart |
104 |
} |
105 |
|
106 |
pre_remove() { |
107 |
# backup our private info before removing. |
108 |
cp /some/data /some/where |
109 |
} |
110 |
|
111 |
|
112 |
> Fetch remote files and install t |
113 |
|
114 |
yes, that would be great! At least, it should not be designed to be |
115 |
impossible to have that feature in future. |
116 |
|
117 |
> Clearly many packages will want behavior of a read-write system so |
118 |
> should we patch programs to behave on read-only systems? |
119 |
|
120 |
That would need alot of work, right? symblinks? We could have some |
121 |
policies where it could be possible to have read-only data, like /etc |
122 |
/bin /sbin/ /usr /opt /lib, while there are some places where the rw dat |
123 |
could go, like /var /tmp. |
124 |
|
125 |
ln -s /etc/mtab /var/lib/mtab |
126 |
|
127 |
> Should we use the /tmp dir at all or stick strictly to /dev/shm/ for |
128 |
> security reasons? |
129 |
|
130 |
I have not studied the problems with /tmp enough. Do you have any links |
131 |
about this subject? |
132 |
|
133 |
> Do we just want to use the tbz2 and write a simple emerge.sh which |
134 |
> handles the lowest of level functions. |
135 |
|
136 |
Maybe. Is there any documentation on this tbz2 format? I have not used |
137 |
it much. (there is a reason I choosed a source based distro :) |
138 |
|
139 |
> Arghh.. I wish I/we could take an easy poll on our website. |
140 |
> |
141 |
> So many options.. Input needed.. |
142 |
|
143 |
I have not really studied how the ebuild scripts work, but what about |
144 |
modularized package managers? |
145 |
|
146 |
PKG_MANAGER=ipkg ebuild foo.ebuild package |
147 |
PKG_MANAGER=dpkg ebuild foo.ebuild package |
148 |
PKG_MANAGER=rpm ebuild foo.ebuild package |
149 |
PKG_MANAGER=tbz2 ebuild foo.ebuild package |
150 |
|
151 |
ebuild will look for a |
152 |
/usr/lib/portage/pkgmanagers/${PKG_MANAGER}.sh |
153 |
|
154 |
In every package manager you will need to have some func, like create, |
155 |
install, remove etc. That way it could be easy to write your own package |
156 |
manager for your own runtime packages, that handles read-only patching, |
157 |
stripping *.a, *.la and *.h, compress with bzip2/gzip if wanted. |
158 |
|
159 |
That is just some ideas. |
160 |
|
161 |
-- |
162 |
Natanael Copa |
163 |
|
164 |
-- |
165 |
gentoo-embedded@g.o mailing list |