Late summary: Package creation problem

From: Paul Boven (p.boven@chello.nl)
Date: Mon Jun 21 2004 - 11:23:12 EDT


Hi everyone,

The question below was posted over 2 months ago, but back then I did not
receive any replies that helped me solve this problem. I have just found
out that the problem is being caused by a bug in Solaris 8/9, hence this
followup to my own posting. The SunSolve BugID is 5050493, the problem
was introduced in patch 110934-16 (Solaris 8) and 113713-13 (Solaris 9).
There is no fix yet for the problem at hand, but a workaround is to
downgrade the patches to 110934-15 or 113713-12. Sun Customer support
couldn't give me an ETA for the eventual fix of this bug yet.

Regards, Paul Boven.

Paul Boven wrote:
> Hi everyone,
>
> I'm trying to build a package, and one of the things it should do when
> installed or removed is to update /etc/system.
>
> To accomplish this, I've created a package class called 'etcsystem' and
> the i.etcsystem and r.etcsystem files. Furthermore, /etc/system is
> listed as file type 'e etcsystem /etc/system 0644 root sys' in the pkgmap.
>
> The i.etcsystem works perfectly. However, when I try to remove my
> package, r.etcsystem does not work. r.etcsystem gets called only once,
> and for some reason pkgrm does not give it the pathname of /etc/system
> to remove the changes. The documentation however states that it should:
>
> + The following list describes the system actions that occur when a
> + class is removed:
>
> + The pkgrm command creates a list of installed path names that belong
> + to the indicated class. Path names referenced byG another package are
> + excluded from the list unless their file type is e (meaning the file
> + should be edited upon installation or removal).
>
> (/etc/system is referenced by SUNWcsr, but both are type e, class
> etcsystem).
>
> + If there is a class action script, the script is executed.
>
> + The pkgrm command invokes the class action script with standard input
> + for the script containing the list (of pathnames)
>
> Because pkgrm does -not- provide /etc/system as a filename on the
> standard input of r.etcsystem, the awk-code inside the while-loop
> doesn't get called (see below).
>
> My prototype-file:
>
> e etcsystem /etc/system=system 0644 root sys
> i ./i.etcsystem
> i ./r.etcsystem
>
> My pkginfo-file contains:
> CLASSES=none etcsystem
>
> Here is the output from pkgrm -v:
>
> ## Verifying package dependencies.
> ## Processing package information.
> ## Removing pathnames in class <etcsystem>
> /etc/system <shared pathname not removed>
> + read DST
> ## Removing pathnames in class <none>
>
> I find the <shared pathname not removed> a bit suspect because it should
> be processed nevertheless because it is a shared editable file.
>
> According to /var/sadm/install/contents:
> /etc/system e etcsystem 0644 root sys 244 23096 1082119452 SUNWcsr SARAtsm
>
> And r.etcsystem contains this:
>
> while read DST
> do
> awk \
> "/^${MARK}/{print (substr( \$0, length(\"${MARK}\")+1));next}
> /^${START}/,/^${STOP}/{next}{print}" <${DST} >${DST}.new
> mv ${DST}.new ${DST}
> done
>
> Does anyone have any idea why this is not working? The same procedure
> works great for e.g. crontabs and other classes I wrote.
>
> Regards, Paul Boven.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:28:55 EDT