On Friday 10 May 2019 12:05:32 pm Chris Hassell wrote:

> I think you just need to attack some debian-package-creation goodness
> and cd down into "packaging/deb".
>
> From there ... outside of documentation and examples ... you have
> these only to change:
>
> ~/.../packaging/deb #1$0 [..local:3_5]@BSL$ grep -n amandabackup *
>
> buildpkg:11:amanda_user=amandabackup
> postinst.src:12:amanda_user=amandabackup
> postrm.src:9:amanda_user=amandabackup
> postrm.src:56:            # only call deluser when amandabackup is in
> $group preinst.src:10:amanda_user=amandabackup
> preinst.src:19:# We require amandabackup to have a specific uid
> because buildtime uid is rules:37:AMANDAUSER=amandabackup
>
> And you can even use the handy-dandy sed command line if you like:
>
>     % sed -i -e 's/amandabackup/amanda/g' packaging/deb/*
>
> That's for the old issue... but for the new one (the prefix being
> /usr/local).. you can just change the variable there in the "rules"
> file (a package's make-and-package script).
>
>
>  14 # These are variables that the user can override.  They get used
> in various 15 # places during configure, build, and install.
>  16 PREFIX=/usr
>  17 BINDIR=$(PREFIX)/bin
>  18 triplet := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
>  19 ifeq ($(triplet),x86_64-linux-gnu)
>  20 LIBDIR=$(PREFIX)/lib/$(triplet)
>
> Again that's packaging/deb/rules ... line #16 changed to wherever you
> like your root-install to start.  I guess PREFIX=/usr/local should do
> it.
>
>     -- CH
>
> On 5/10/19 8:14 AM, Gene Heskett wrote:
>
> On Friday 10 May 2019 10:13:30 am Chris Hassell wrote:
>
>
>
> On 5/9/19 11:31 PM, wrote:
>
>
> <snip>
> but scanimage -L locks up tight useing zero cpu and is unkillable,
> I'll have to reboot to get rid of it.  This kernel is a preempt-rt
> kernel, and doesn't have some of a normal kernels bells and
> whistles, like usbhid-ups is missing, and that speaks to my ups.
>
>
>
> I have a kernel like that too with Manjaro/Arch... non custom. They're
> nice but boy they do take their time if something else is competing
> for resources.  Do a "dmesg" and see if something has bit down hard on
> your kernel's locks and crashed/paniced some thread.
>
>
>
> dmesg is rather non-commital, as I'd expect for a kernel that cam make
> sub 10 microsecond latencies in an old phenom. Normal kernels on an
> amd phenom are several hundred milliseconds.
> As for dmesg, no unusual other than it doesn't find a scanner at the
> same usb address as the Brother MFC-J6920DW printer. So I am going to
> shut down, swap sata1 and sata0 cables and boot back to wheezy where
> all this works, and see if the detection during dmesg is different.
>
>
>
> Maybe using "ps l<pid>" will show the symbol/wait-channel that it's
> stuck in.    That's definitely one way to see why a process (if you
> can find the one) is sitting at zero cpu. "Pstree" is fun to use
> because it can show the 'leaf' ... the latest and lowest child that
> was created that all the rest of the process group are waiting on.
> That's usually the one in the spotlight... or the do-nothing-spotlight
> in this case.
>
>
>
> Unforch, no pstree seems to be available, ISTR i looked yesterday.
> Ahh, found it, its in psmisc.deb.  And its not reporting some things,
> I have a bash script that tells tde-kmail to go get the mail when a
> mail comes in and is written to /var/mail/$name. htop sees it. but
> pstree doesn't.
>
> pstree spits out 100 lines of hits, while htop says there are 111
> tasks ATM. But on a 5th run of pstree, mailwatcher is there. A Head
> scratcher.
>
> But I think I need to get sane, or scanimage -L working next as thats
> screw up several other things, like gimp and the *office* stuffs. I
> can kill the ups stuff thats spamming the logs. I've also posted to
> the emc-dev list about this kernel lack of a couple modules. So I'll
> expect things will eventually get fixed.
[...]
One diff though, I
> have never hand installed with a null prefix, always been /usr/local. 
> Using your procedure, how would I make it work to build and install in
> /usr/local?

>
Needs two more $varnames in the rules file, $USERNAME and $GROUPNAME so 
that one does not have to troll all the way thru the rules file to 
change all the names of the debs from amanda-backup-client to 
amanda-client yadda yadda.

But this needs to be in the git clone as downloaded or possibly as a 
patch to be applied by autogen autogen or thereabouts.  Otherwise its a 
lot of work, only to be rewritten back to the original by the fresh git 
clone.  Or can I just do a make clean and rerun the packaging command to 
change both the prefix and the packaging names?


I've done the rules edits, now lets see what I get starting with "bash 
autogen".

But that blew up, and I don't see why, so rules 
and /var/log/amanda.install.log from yesterday's fail is attached.
And I can't find the build.log if there is one.

One other comment, I only tried dump once, 20 years ago, such a disaster 
I've used tar ever since, but I see it wasting time, a lot of it, 
testing dump.  You may want to take a survey and see if among us, there 
is anybody using dump. It might be worthwhile to drop it.

This build baled out here:  And this time, maybe. I keep setting bashes 
damned history up to 10,000 lines, and the next time I look its back to 
1000 which is not enough by a hell of a long row of apple trees.  So 
this time I set it unlimited.  And in the first 50 lines I see its back 
to amandabackup for a user. ctl+c and I give up for today. I have to go 
pay the rent on a wheelchair that hasn't been used since last summer. 
Same with her car she'll never drive again but won't let me sell it. 
2007 Toy RAV-4 with about 63k miles on it.

So 3 things, make prefix=/usr/local, make user=amanda. And make 
debs "amanda-server-version.deb" and "amanda-client-version.deb" 
and "amanda-common-version.deb", that last I don't see being built.

Put it in the git repo as we can always move prefix.  Or make prefix part 
of the autogen command line, or maybe even a user generated file the 
package builder can refer to, hell even an env $var, whatever floats the 
boat best.  Your call, but it needs to be adjustable for those building 
their own.



>
> Copyright 2019 by Maurice E. Heskett
> Cheers, Gene Heskett
>
>
>
>
> Cheers, Gene Heskett



Copyright 2019 by Maurice E. Heskett
Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

#!/usr/bin/make -f
# debian/rules for amanda using debhelper. GNU copyright 2008 by Dan Locks,
# based on work by Bdale Garbee.

#       Warning - do *not* use -j on an SMP machine, or the build gets
#       confused... some sort of race condition in the makefiles?
#
CWD := $(shell pwd)

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
AMVER=`cat FULL_VERSION`

# These are variables that the user can override.  They get used in various
# places during configure, build, and install.
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
triplet := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
ifeq ($(triplet),x86_64-linux-gnu)
LIBDIR=$(PREFIX)/lib/$(triplet)
else
LIBDIR=$(PREFIX)/lib
endif
AMLIBDIR=$(LIBDIR)/amanda
LIBEXECDIR=$(LIBDIR)
AMLIBEXECDIR=$(LIBEXECDIR)/amanda
MANDIR=$(PREFIX)/share/man
DOCDIR=$(PREFIX)/share/doc
SYSCONFDIR=/etc
LOCALSTATEDIR=/var
AMANDAHOMEDIR=$(LOCALSTATEDIR)/lib/amanda
LOGDIR=$(LOCALSTATEDIR)/log/amanda
# Extract the perl site_lib directory.  This is used to install amanda's perl 
# libs. If configure finds a different install or you specify a different path 
using
# --with-amperldir= make sure you change this variable as well.
PERLSITELIB=$(shell perl -V:installsitelib|sed 
-e"s:installsitelib='/::;s:'\;::")
AMANDAUSER=amanda
AMANDAGROUP=disk
WITHOUT_SERVER="False"
WITHOUT_CLIENT="False"

r=$(CWD)/debian/tmp
server=$(CWD)/debian/amanda-server
client=$(CWD)/debian/amanda-client

log=$(CWD)/debian/dpkg.log

# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_BUILD_ARCH_BITS  ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_BITS)

WD=$(CWD)

build: build-stamp
build-stamp: /sbin/dump /usr/bin/smbclient
        dh_testdir
        ./configure \
                MAKEFLAGS="-j1 " \
                CFLAGS="-pipe " \
                MAILER=/usr/bin/mail \
                --enable-as-needed \
                --enable-manpage-build \
                --quiet \
                --host=$(DEB_HOST_GNU_TYPE) \
                --build=$(DEB_BUILD_GNU_TYPE) \
                --prefix=$(PREFIX) \
                --libdir=$(LIBDIR) \
                --bindir=$(BINDIR) \
                --mandir=$(MANDIR) \
                --libexecdir=$(LIBEXECDIR) \
                --enable-shared \
                --sysconfdir=$(SYSCONFDIR) \
                --localstatedir=$(LOCALSTATEDIR) \
                --with-amdatadir=$(AMANDAHOMEDIR) \
                --with-gnutar-listdir=$(AMANDAHOMEDIR)/gnutar-lists \
                --with-index-server=localhost \
                --with-tape-server=localhost \
                --with-user=$(AMANDAUSER) \
                --with-group=$(AMANDAGROUP) \
                --with-fqdn \
                --with-bsd-security \
                --with-bsdtcp-security \
                --with-bsdudp-security \
                --with-amandahosts \
                --with-smbclient=$(BINDIR)/smbclient \
                --with-debugging=$(LOGDIR) \
                --with-ssh-security \
                --with-assertions \
                --enable-s3-device \
                --disable-installperms
        touch missing
        # Preinst is the same for client and server, but we leave room for
        # differences by just appending here.
        cat $(WD)/debian/preinst >> $(WD)/debian/amanda-client.preinst
        cat $(WD)/debian/preinst >> $(WD)/debian/amanda-server.preinst
        # Postinst and postrm keep client/server differences to just variables;
        # the postinst/postrm logic is otherwise the same.
        cat $(WD)/debian/postinst >> $(WD)/debian/amanda-client.postinst
        cat $(WD)/debian/postinst >> $(WD)/debian/amanda-server.postinst
        cat $(WD)/debian/postrm >> $(WD)/debian/amanda-client.postrm
        cat $(WD)/debian/postrm >> $(WD)/debian/amanda-server.postrm
        make -s LIBTOOLFLAGS=--silent
        touch build-stamp

clean:
        dh_testdir >> $(log) 2>&1
        dh_testroot >> $(log) 2>&1
        -make -s LIBTOOLFLAGS=--silent clean
        -make -s LIBTOOLFLAGS=--silent distclean
        -rm -f build-stamp missing config/config.h common-src/genversion
        -find . -type d -name .deps -exec rm -rf {} \;
        -test -r /usr/share/misc/config.sub && \
                cp -f /usr/share/misc/config.sub config/config.sub
        -test -r /usr/share/misc/config.guess && \
                cp -f /usr/share/misc/config.guess config/config.guess
        dh_clean >> $(log) 2>&1

# Build architecture-dependent files here.
binary-arch: build
        echo "---->dh_testdir: " >> $(log)
        dh_testdir >> $(log) 2>&1
        echo "---->dh_testroot: " >> $(log)
        dh_testroot >> $(log) 2>&1
        echo "---->dh_clean: " >> $(log)
        dh_clean -k >> $(log) 2>&1
        echo "---->dh_installdirs: " >> $(log)
        dh_installdirs -v >> $(log) 2>&1
        make -s LIBTOOLFLAGS=--silent install DESTDIR=$(r)
        echo "---->dh_installdocs: " >> $(log)
        dh_installdocs -v >> $(log) 2>&1
        install -d $(r)/$(DOCDIR)/amanda-common/examples
        cp -a example/* $(r)/$(DOCDIR)/amanda-common/examples
        cp ChangeLog $(r)/$(DOCDIR)/amanda-common/changelog
        echo "---->dh_installchangelogs: " >> $(log)
        dh_installchangelogs -v >> $(log) 2>&1
        # Here's how we get the perl modules installed into sitelib
        echo $(PERLSITELIB)/* >> debian/amanda-server.install
        echo "---->dh_install -v --fail-missing: " >> $(log)
        dh_install -v --sourcedir=$(r) >> $(log) 2>&1
        echo "---->dh_strip: " >> $(log)
        dh_strip >> $(log) 2>&1
        echo "---->dh_compress: " >> $(log)
        dh_compress >> $(log) 2>&1
        echo "---->dh_fixperms: " >> $(log)
        dh_fixperms -v >> $(log) 2>&1
        # fix perms manually
        chown -R $(AMANDAUSER):$(AMANDAGROUP) debian/*/var/lib/*
        #chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/*
        chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(LOGDIR) 
$(server)/$(LOGDIR)
        #chmod -R u=rwX,g=rwX,o-rwx $(server)/$(LOGDIR)
        chown -R $(AMANDAUSER):$(AMANDAGROUP)  $(client)/$(SYSCONFDIR)/amanda 
$(server)/$(SYSCONFDIR)/amanda
        chmod -R u=rwX,g=rwX,o-rwx $(client)/$(SYSCONFDIR)/amanda
        chmod -R u=rwX,g=rwX,o-rwx $(server)/$(SYSCONFDIR)/amanda
        chown -R $(AMANDAUSER):$(AMANDAGROUP) 
$(client)/$(AMANDAHOMEDIR)/gnutar-lists $(server)/$(AMANDAHOMEDIR)/gnutar-lists
        chmod -R u=rwX,g=rwX,o-rwx  $(client)/$(AMANDAHOMEDIR)/gnutar-lists 
$(server)/$(AMANDAHOMEDIR)/gnutar-lists
        # .. setuid
        chown root:disk \
                $(client)/$(AMLIBEXECDIR)/application/amgtar \
                $(client)/$(AMLIBEXECDIR)/application/amstar \
                $(client)/$(AMLIBEXECDIR)/killpgrp \
                $(client)/$(AMLIBEXECDIR)/rundump \
                $(client)/$(AMLIBEXECDIR)/runtar \
                $(client)/$(AMLIBEXECDIR)/calcsize \
                $(server)/$(AMLIBEXECDIR)/application/amgtar \
                $(server)/$(AMLIBEXECDIR)/application/amstar \
                $(server)/$(AMLIBEXECDIR)/killpgrp \
                $(server)/$(AMLIBEXECDIR)/rundump \
                $(server)/$(AMLIBEXECDIR)/runtar \
                $(server)/$(AMLIBEXECDIR)/calcsize \
                $(server)/$(AMLIBEXECDIR)/ambind
        chmod u=srwx,g=rx,o= \
                $(client)/$(AMLIBEXECDIR)/application/amgtar \
                $(client)/$(AMLIBEXECDIR)/application/amstar \
                $(client)/$(AMLIBEXECDIR)/killpgrp \
                $(client)/$(AMLIBEXECDIR)/rundump \
                $(client)/$(AMLIBEXECDIR)/runtar \
                $(client)/$(AMLIBEXECDIR)/calcsize \
                $(server)/$(AMLIBEXECDIR)/application/amgtar \
                $(server)/$(AMLIBEXECDIR)/application/amstar \
                $(server)/$(AMLIBEXECDIR)/killpgrp \
                $(server)/$(AMLIBEXECDIR)/rundump \
                $(server)/$(AMLIBEXECDIR)/runtar \
                $(server)/$(AMLIBEXECDIR)/calcsize \
                $(server)/$(AMLIBEXECDIR)/ambind
        echo "Amanda version $(AMVER)" >  
$(server)/$(AMANDAHOMEDIR)/amanda-release
        echo "Amanda version $(AMVER)" >  
$(client)/$(AMANDAHOMEDIR)/amanda-release
        install -o root -g root -m 0644 debian/amanda-client.lintian \
                $(client)/usr/share/lintian/overrides/amanda-client
        install -o root -g root -m 0644 debian/amanda-server.lintian \
                $(server)/usr/share/lintian/overrides/amanda-server
        dh_makeshlibs  >> $(log) 2>&1
        dh_perl >> $(log) 2>&1
        dh_shlibdeps -l"$(r)$(LIBDIR):$(client)$(LIBDIR):$(server)$(LIBDIR)" >> 
$(log) 2>&1
        dh_installdeb >> $(log) 2>&1
        dh_gencontrol >> $(log) 2>&1
        dh_md5sums  >> $(log) 2>&1
        dh_builddeb  >> $(log) 2>&1

source diff:
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

binary: binary-arch
.PHONY: build clean binary-arch binary
May 09 2019 16:51:12: Preparing to install: Amanda Server 3.5.1.git.19364c7b
May 09 2019 16:51:12: Checking for user: amandabackup
May 09 2019 16:51:13: The Amanda user 'amandabackup' exists on this system.
May 09 2019 16:51:13: Verify amandabackup's primary group = disk 
May 09 2019 16:51:13: amandabackup not a member of disk
May 09 2019 16:51:13: groupadd: groupadd: group 'disk' already exists
May 09 2019 16:51:13: Adding amandabackup to disk
May 09 2019 16:51:13: Verify amandabackup is a member of tape.
May 09 2019 16:51:13: amandabackup is not a member of supplemental group tape.
May 09 2019 16:51:13: groupadd: groupadd: group 'tape' already exists
May 09 2019 16:51:13: Adding amandabackup to tape
May 09 2019 16:51:13: Verify amandabackup's shell is /bin/bash.
May 09 2019 16:51:13: WARNING: The user 'amandabackup' must have its home directory set to
'/var/lib/amanda' Please correct before using Amanda.
May 09 2019 16:51:13: WARNING: The amandabackup's home directory,'/var/lib/amanda' ownership must be changed to 'amandabackup:disk'. 
May 09 2019 16:51:13: Found existing /var/log/amanda
May 09 2019 16:51:13: Creating /var/log/amanda.
May 09 2019 16:51:13: Preinstall done.

Reply via email to