Running Smart Package manager as non-root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I want to run the smart package manager on my fedora machine, but I
don't want it to manage the system wide RPM's, but just some user
specific RPMs. I want a typical user to be able to manage his own set of
RPMs independently of the system management.

I am running Fedora Core 8 and when I download the smart package I get
version 1.1.
I've discovered a few things. I go to the /usr/lib/smart/distro.py file
and add these two lines:

if not sysconf.getReadOnly():
    if not sysconf.has("channels"):
+      sysconf.set("rpm-root","/opt/myprojects")
+      sysconf.set("detect-sys-channels", False)
        sysconf.set(("channels", "rpm-db"),
                    {"alias": "rpm-db",
                     "type": "rpm-sys",
                     "name": "RPM Database"})

When I do this and bring up "smart-root --gui" I provide root's password
and everything does what I want which will take any RPM I ask smart to
load and load it under /opt/myprojects and keeps the RPM database in
the /opt/myprojects/var/lib/rpm. SO, the RPM database is separate from
the system.

Now if I run just "smart --gui" I get in some read-only mode that won't
let me install anything. It seems if smart's datadir is not writable
then you get in this read-only mode.
So, I start over by doing this:

# rm -rf /opt/myprojects/*
# chown myuser:myuser /opt/myprojects

edit
/usr/lib/python2.5/site-packages/smart/const.py

change the DATADIR to a file I have write permissions on


DISTROFILE  = "/usr/lib/smart/distro.py"
PLUGINSDIR  = "/usr/lib/smart/plugins/"
+ DATADIR     = "/opt/myproject/var/lib/smart/"
USERDATADIR = "~/.smart/"
CONFFILE    = "config"


Now I run "smart --gui" as me and it seems to initialize the rpm
database under /opt/myproject OK. But, when I try to actually install an
RPM I get permission denied errors. It seems when I am not root it wants
to try and load the RPMs into /, which I don't have permissions for,
instead of /opt/myproject, which I do have permissions for. So, it seems
weird that it manages the RPM database under /opt/myproject, but it
doesn't want to install the packages under /opt/myproject.

How do I get smart to manage it's RPMs in a different DB then the system
wide one and also get it to load all RPMs into a predetermined
directory, other then "/",  and do all of this as a normal, non-root,
user ?

Thanks
Chris Kottaridis

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux