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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux