Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18466 - amanda-2.4.4.ebuild (New package)
Summary: amanda-2.4.4.ebuild (New package)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-30 06:34 UTC by Bernd Howoritsch
Modified: 2003-06-27 00:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
amanda ebuilds (Client/Server and Client only) (amanda-2.4.4.tar.gz,12.12 KB, application/gzip)
2003-03-30 06:36 UTC, Bernd Howoritsch
Details
amanda ebuilds (Client/Server and Client only) (amanda-2.4.4.tar.gz,13.38 KB, application/x-gzip)
2003-06-02 04:58 UTC, Bernd Howoritsch
Details
amanda-2.4.4 server/client and client only (amanda-2.4.4.tar.gz,13.71 KB, application/gzip)
2003-06-03 06:17 UTC, Bernd Howoritsch
Details
amanda-2.4.4-ebuilds server/client and client (amanda-2.4.4.tar.gz,13.75 KB, application/gzip)
2003-06-03 11:00 UTC, Bernd Howoritsch
Details
amanda-2.4.4 server/client only (amanda-server_client-2.4.4.tar.gz,4.12 KB, application/gzip)
2003-06-04 06:54 UTC, Bernd Howoritsch
Details
amanda-2.4.4 client only (amanda-client.2,4.4.tar.gz,2.58 KB, application/gzip)
2003-06-04 16:15 UTC, Bernd Howoritsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Howoritsch 2003-03-30 06:34:51 UTC
Hi,

(http://www.amanda.org)

Please find attached amanda.tar.gz containing amanda-2.4.4.ebuild  and
amanda-client-2.4.4. The first ebuild is for the Backupserver (Client and
Server) and the second only for the Client.

Following steps will be done by the amanda-2.4.4.ebuild:
* get amanda-2.4.4.tar.gz from ftp.amanda.org
* add user "amanda" with groups "amanda" and "lp" (home is /etc/amanda)
* compile and install
* create some directories (/etc/amanda, /tmp/amanda) owned by amanda
* copy xinetd-services into /etc/xinetd.d
* copy .amandahosts to home-directory of amanda
* copy a global.conf to /etc/amanda
* copy some printlabels to /etc/amanda/lbl
* copy an example to /etc/amanda/example
* touch /etc/amandates
* chown all directories

I would suggest, that this ebuilds come into app-arch.

Bernd.
Comment 1 Bernd Howoritsch 2003-03-30 06:36:16 UTC
Created attachment 10012 [details]
amanda ebuilds (Client/Server and Client only)
Comment 2 Leonid Kabanov 2003-04-30 02:02:32 UTC
How about dump in DEPEND in amanda-client-2.4.4.ebuild?
Comment 3 Leonid Kabanov 2003-04-30 03:44:52 UTC
I try amanda-client ebuild. Following bugs discovered:
>=app-arch/dump-0.4.31 is not included in DEPEND
After install:
/etc/amanda/gnutar/ - does not exists. Quick fix - mkdir /etc/amanda/gnutar/ && chown amanda\: /etc/amanda/gnutar/
/etc/dumpdates - does not exists. Quick fix - touch /etc/dumpdates && chown amanda\: /etc/dumpdates
User 'amanda' cannot read/write raw partitons. Quick fix - add folowing line in devfsd.conf
REGISTER        ^scsi/host.*/bus.*/target.*/lun.*/part[0-9]+    PERMISSIONS root.amanda 660
and killall -HUP devfsd (only for scsi, of course; fix for ide is very similar)
Comment 4 Leonid Kabanov 2003-04-30 03:47:46 UTC
P.S. /usr/share/amanda/ is not very good place for documentation
Comment 5 Bernd Howoritsch 2003-06-02 04:56:58 UTC
* dump now in DEPEND
* /etc/amanda/gnutar will now be created
* /etc/dumpdates now exists
* added comment on how to create rawacces to partitions
* Documentation is now in /usr/share/doc/amanda-2.4.4
Comment 6 Bernd Howoritsch 2003-06-02 04:58:19 UTC
Created attachment 12665 [details]
amanda ebuilds (Client/Server and Client only)
Comment 7 Leonid Kabanov 2003-06-02 21:50:45 UTC
For now it works fine both on i386 (pentium4) and ppc (rs6000 7043-240) platforms. Just one problem - it doesn't compile in sandbox environment. First it failed on useradd/groupadd (may be enewuser/enewgroup should be used?) and then on mkdir/touch (using /etc/amanda/gnutar instead ${D}/etc/amanda/gnutar?).
Also notice about raw access must be included in amanda-client too. 
Comment 8 Bernd Howoritsch 2003-06-03 06:16:20 UTC
* enewuser/enewgroup now in pkg_preinst() (didn't know that functions)
* Changed amanda.amanda to 222.222 because user amanda does not exist...
* New file in /etc/devfs.d (because of /dev/devfsd.conf: INCLUDE  /etc/devfs.d)
* Changed eerror to einfo (i think its not an error...)
* Added pkg_postrm (without it many files will remain on system...)
* added raw access to client
I also added a .bashrc to user amanda to find the files in /usr/libexec

Hope you are know happy, Leonid ;-)))
Comment 9 Bernd Howoritsch 2003-06-03 06:17:38 UTC
Created attachment 12743 [details]
amanda-2.4.4 server/client and client only
Comment 10 Bernd Howoritsch 2003-06-03 10:58:30 UTC
* added DEPEND=net-mail/mailx  to server-client-ebuild
Comment 11 Bernd Howoritsch 2003-06-03 11:00:08 UTC
Created attachment 12756 [details]
amanda-2.4.4-ebuilds server/client and client
Comment 12 Leonid Kabanov 2003-06-03 21:18:28 UTC
1. There is no Manifest file for amanda-client:
--- No package manifest found: /path/to/amanda-client/Manifest
2. Some users already have inetd installed so may be xinetd replace with virtual/inetd? If so, following lines (or similar) should be added to notice:
If you use inetd (not xinetd) add following lines to your /etc/inetd.conf:
amanda          dgram   udp     wait    amanda  /usr/libexec/amanda/amandad       amandad
amandaidx       stream  tcp     nowait  amanda  /usr/libexec/amanda/amindexd      amindexd
amidxtape       stream  tcp     nowait  amanda  /usr/libexec/amanda/amidxtaped    amidxtaped

3. I test amanda/amanda-client on ppc so it could be added to KEYWORDS
4. I think '/usr/libexec/amanda' is better place then '/usr/libexec' for amanda's files so '--libexecdir=/usr/libexec/amanda' should be added to params of 'configure' script and /etc/xinetd.d/am* changed according new path
5. Following lines in pkg_postrm() should be removed (for now all this files removed by emerge):
    rm -rf /etc/amanda/lbl
    rm -rf /etc/amanda/example
    rm -rf /etc/xinetd.d/amanda /etc/xinetd.d/amandaidx /etc/xinetd.d/amidxtape
6. 'make install DESTDIR=${D}' should be used instead of einstall

P.S. Good work, Bernd! 
Comment 13 Leonid Kabanov 2003-06-03 22:30:32 UTC
7. enewgroup/enewuser should be placed before 'configure' script and change 222 to amanda to avoid following error:
sendsize[21974]: time 0.642: calculating for amname '/home/cvsroot', dirname '/home/cvsroot', spindle -1
sendsize[21974]: time 0.642: getting size via gnutar for /home/cvsroot level 0
sendsize[21974]: time 0.821: spawning /usr/libexec/amanda/runtar in pipeline
sendsize[21974]: argument list: /bin/tar --create --file /dev/null --directory /home/cvsroot --one-file-system --listed-incremental /etc/amanda/gnutar/proxy.krasu.ru_home_cvsroot_0.new --sparse --ignore-failed-read --totals .
sendsize[21974]: time 0.826: error [cannot find user 222 in passwd file]
sendsize[21974]: time 0.826:
sendsize[21974]: time 0.827: .....
sendsize[21974]: estimate time for /home/cvsroot level 0: 0.006
sendsize[21974]: no size line match in /bin/tar output for "/home/cvsroot"
sendsize[21974]: .....
sendsize[21974]: estimate size for /home/cvsroot level 0: -1 KB
sendsize[21974]: time 0.827: waiting for /bin/tar "/home/cvsroot" child
sendsize[21974]: time 0.827: after /bin/tar "/home/cvsroot" wait
sendsize[21974]: time 0.827: getting size via gnutar for /home/cvsroot level 1
sendsize[21974]: gnutar: error opening /etc/amanda/gnutar/proxy.krasu.ru_home_cvsroot_0: No such file or directory
sendsize[21974]: time 1.007: spawning /usr/libexec/amanda/runtar in pipeline
sendsize[21974]: argument list: /bin/tar --create --file /dev/null --directory /home/cvsroot --one-file-system --listed-incremental /etc/amanda/gnutar/proxy.krasu.ru_home_cvsroot_1.new --sparse --ignore-failed-read --totals .
sendsize[21974]: time 1.015: error [cannot find user 222 in passwd file]
sendsize[21974]: time 1.016:
sendsize[21974]: time 1.016: .....
sendsize[21974]: estimate time for /home/cvsroot level 1: 0.008
sendsize[21974]: no size line match in /bin/tar output for "/home/cvsroot"
sendsize[21974]: .....
sendsize[21974]: estimate size for /home/cvsroot level 1: -1 KB
sendsize[21974]: time 1.016: waiting for /bin/tar "/home/cvsroot" child
sendsize[21974]: time 1.016: after /bin/tar "/home/cvsroot" wait
sendsize[21974]: time 1.016: done with amname '/home/cvsroot', dirname '/home/cvsroot', spindle -1
sendsize[21785]: time 1.017: child 21974 terminated normally
sendsize[21785]: time 1.017: waiting for any estimate child
Comment 14 Bernd Howoritsch 2003-06-04 06:53:35 UTC
ONLY SERVER/CLIENT-EBUILD!!!!

* added Info about Firewall
* virtual/inetd added
   Is there a special directory where "addons" like in xinetd are stored????
* added virtual/mta
* /usr/libexec/amanda added to configure
* bashrc, xinetd-files adjusted to use /usr/libexec/amanda
* xinetd-files only allow local connect and are disabled by default
* Manifest created
* printer-files are now copied from the source
* added ppc to KEYWORD
* pkg_setup instead of pkg_preinst
* einstall changed to make install DESTDIR....

* enewuser removed (seems buggy):
FIRST RUN:
+ fperms amanda /etc/amanda
chmod: Ung
Comment 15 Bernd Howoritsch 2003-06-04 06:53:35 UTC
ONLY SERVER/CLIENT-EBUILD!!!!

* added Info about Firewall
* virtual/inetd added
   Is there a special directory where "addons" like in xinetd are stored????
* added virtual/mta
* /usr/libexec/amanda added to configure
* bashrc, xinetd-files adjusted to use /usr/libexec/amanda
* xinetd-files only allow local connect and are disabled by default
* Manifest created
* printer-files are now copied from the source
* added ppc to KEYWORD
* pkg_setup instead of pkg_preinst
* einstall changed to make install DESTDIR....

* enewuser removed (seems buggy):
FIRST RUN:
+ fperms amanda /etc/amanda
chmod: Ungültige Modus-Zeichenkette: »amanda«
+ diefunc dyn_setup 435 1 'pkg_setup function failed; exiting.'
+ local funcname=dyn_setup lineno=435 exitcode=1
+ shift 3
+ echo

+ echo '!!! ERROR: app-arch/amanda-2.4.4 failed.'
!!! ERROR: app-arch/amanda-2.4.4 failed.
+ echo '!!! Function dyn_setup, Line 435, Exitcode 1'
!!! Function dyn_setup, Line 435, Exitcode 1
+ echo '!!! pkg_setup function failed; exiting.'
!!! pkg_setup function failed; exiting.
+ echo

+ exit 1

SECOND RUN:
+ echo -e ' * amanda already exists on your system :)'
* amanda already exists on your system :)
+ return 0
+ enewuser amanda 222 /bin/bash /etc/amanda amanda
+ local euser=amanda
+ shift
+ '[' -z amanda ']'
+ einfo 'Adding user '\''amanda'\'' to your system ...'
+ '[' no = yes ']'
+ echo -e ' * Adding user '\''amanda'\'' to your system ...'
* Adding user 'amanda' to your system ...
+ which mktemp
++ mktemp -p /var/tmp/portage/amanda-2.4.4/temp
+ local tmpfile=/var/tmp/portage/amanda-2.4.4/temp/tmp.XXXXStnH6k
+ touch /var/tmp/portage/amanda-2.4.4/temp/tmp.XXXXStnH6k
+ chown amanda /var/tmp/portage/amanda-2.4.4/temp/tmp.XXXXStnH6k
++ ls -l /var/tmp/portage/amanda-2.4.4/temp/tmp.XXXXStnH6k
++ awk '{print $3}'
+ local realuser=amanda
+ '[' '!' -z 'amanda]'
/usr/sbin/ebuild.sh: line 400: [: missing `]'
+ id amanda
uid=222(amanda) gid=222(amanda) Gruppen=222(amanda)
+ einfo 'amanda already exists on your system :)'
+ '[' no = yes ']'
+ echo -e ' * amanda already exists on your system :)'
* amanda already exists on your system :)
+ return 0
+ set +x
...compiling...

>5. Following lines in pkg_postrm() should be removed
>  (for now all this files removed by emerge):
                                                            ^^^^^^^^^^^
After 'emerge unmerge amanda' all the files installed with 'insinto' and 'newins' are still there... 
Any Idea without pkg_postrm()?? 'insinto ${D}/...' didn't copy anything although these files were copied to image-directory...

Bernd.
Comment 16 Bernd Howoritsch 2003-06-04 06:54:13 UTC
Created attachment 12777 [details]
amanda-2.4.4 server/client only
Comment 17 Bernd Howoritsch 2003-06-04 16:15:07 UTC
* added Info about Firewall
* virtual/inetd added
* /usr/libexec/amanda added to configure
* xinetd-files adjusted to use /usr/libexec/amanda
* xinetd-files only allow local connect and are disabled by default
* Manifest updated
* added ppc to KEYWORD
* pkg_setup instead of pkg_preinst
* einstall changed to make install DESTDIR....
Comment 18 Bernd Howoritsch 2003-06-04 16:15:55 UTC
Created attachment 12801 [details]
amanda-2.4.4 client only
Comment 19 Leonid Kabanov 2003-06-05 03:31:18 UTC
1. enewuser works fine for me. Did you send a bugreport?
2. virtual/mta is already in mailx's DEPEND
3. inetd haven't such directory. I propose to place inetd.amanda in docs directory and to add info about it in notice
4. Files in /etc are protected by emerge (/etc is in CONFIG_PROTECT variable in make.globals)
Comment 20 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-06-26 12:48:43 UTC
Commited to CVS.
Comment 21 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-06-26 12:50:25 UTC
In CVS.
Comment 22 Leonid Kabanov 2003-06-26 21:59:29 UTC
For now I see amanda-2.4.4.ebuild only. Is amanda-client-2.4.4.ebuild commited?
Comment 23 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-06-27 00:03:37 UTC
The ebuild should contain both the client and server modules.
They are not being split up for the 1.4 release, but that stuff will be looked at after 1.4 is released.