Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SELinux disabled #971

Open
isula-xufeng opened this issue Sep 4, 2017 · 3 comments
Open

Support SELinux disabled #971

isula-xufeng opened this issue Sep 4, 2017 · 3 comments

Comments

@isula-xufeng
Copy link

** Host system details **
I know this is not a bug, I just want to know is there a way to install packages by rpm-ostree if the ostree
repo was not composed by rpm-ostree, instead it was generated by "ostree commit --tree=dir=$rootfs-dir"。

I think this should be caused by rpm-ostree Treefile default behavior, by default, selinux is enabled in rpm-ostree.

By the way, SElinux is disabled globally in my system.

** Expected vs actual behavior **

# rpm-ostree install somepackage
error: Failed to find metadata key rpmostree.sepolicy (signature s)

Expected:

# rpm-ostree install foo
...
Success!
@cgwalters
Copy link
Member

cgwalters commented Sep 5, 2017

Supporting non-rpm-ostree compose tree systems is not currently part of our design; however, it's highly likely that in the future we'll support a more Dockerfile style freeform assembly for root filesystems. There's various requirements there; we'd still need an RPM database (and in /usr/share/rpm) for example. The kernel reworking that's happening now will make this easier too.

As far as supporting systems with SELinux disabled...in theory we support it but in practice it's not tested and I can think offhand of several places that probably needs tweaking.

@cgwalters cgwalters changed the title Is there a way to run "rpm-ostree install $pkg" for non-rpm-ostree composed repo? Support SELinux disabled Sep 5, 2017
@cgwalters
Copy link
Member

One thing that would turn this from a corner case into a top-tier support target is doing more container testing of rpm-ostree. Some discussion in https://mail.gnome.org/archives/ostree-list/2017-February/msg00009.html

A vast majority of our test coverage could equally well be done in a container - the main things omitted would be SELinux and bootloader handling. Which are obviously critical path items that are under-tested, but OTOH there's a huge amount of stuff that isn't that, like most of the package layering logic, etc.

@cgwalters cgwalters mentioned this issue Nov 16, 2017
sidcha pushed a commit to sidcha/photon that referenced this issue Aug 12, 2019
- Below packages are added:
* rpm-ostree
* ostree
* rust
* libmodumd
* librepo
* zchunk
* python-pycodestyle
* pyhton-autopep8

- libsolv package is updated as it is required by rpm-ostree.
  * Added a patch to fix database ID's more than 2^31 after
    modifying the upstream patch
- In rpm-ostree package, added couple of patches:
  * One patch to fix the dnf build issue
  * Other patch is to disable selinux which is required for
    "rpm-ostree install" command to work
    Note: Support for Disabling SELinux issue is not fixed upstream:
          coreos/rpm-ostree#971
          So, i added this patch to disable the selinux
- Replaced (pkgname or toybox) to pkgname in multiple Specs
  Because during repo creation dracut unable to parse that "or" instruction

Installer:
- Added Support for rpm-ostree
- Added an option to the photon installation flavor as "Photon Ostree Host"

Testing:
- Locally I have tested and verified all major below commands:

1. rpm-ostree upgrade
2. rpm-ostree rollback
3. rpm-ostree install pkgname
4. rpm-ostree install url
5. rpm-ostree remote
6. rpm-ostree rebase
7. rpm-ostree compose
8. rpm-ostree status
9. rpm-ostree uninstall
10. rpm-ostree reset

Change-Id: Iaa8b70cf343fff0b3fcafdf07c1810adb6eb043b
ghost pushed a commit to vmware/photon that referenced this issue Sep 12, 2019
- Below packages are added:
* rpm-ostree
* ostree
* rust
* libmodumd
* librepo
* zchunk
* python-pycodestyle
* pyhton-autopep8

- libsolv package is updated as it is required by rpm-ostree.
  * Added a patch to fix database ID's more than 2^31 after
    modifying the upstream patch
- In rpm-ostree package, added couple of patches:
  * One patch to fix the dnf build issue
  * Other patch is to disable selinux which is required for
    "rpm-ostree install" command to work
    Note: Support for Disabling SELinux issue is not fixed upstream:
          coreos/rpm-ostree#971
          So, i added this patch to disable the selinux
- Added a patch to support Dualboot in ostree spec
- Added unicode.pf2 file installer/boot required for efi boot in Dell5k,Dell3k
  Because grub menu comes first to select the tree on boot
  * Downloaded from:
    https://git.kthx.at/booting/usb/raw/090999c0f9e0990a60f836d80a416dadf6517a75/boot/grub/fonts/unicode.pf2
- Linux param from photon_cmdline and systemd_cmdline

Installer:
- Added Support for rpm-ostree
- Added Dualboot support for rpm-ostree
- Added an option to the photon installation flavor as "Photon Ostree Host"

Testing:
- Locally I have tested and verified all major below commands:

1. rpm-ostree upgrade
2. rpm-ostree rollback
3. rpm-ostree install pkgname
4. rpm-ostree install url
5. rpm-ostree remote
6. rpm-ostree rebase
7. rpm-ostree compose
8. rpm-ostree status
9. rpm-ostree uninstall
10. rpm-ostree reset

- Tested and verified DualBoot functionality on Dell5k
- Tested and verified functionality on Dell3k

Change-Id: Iaa8b70cf343fff0b3fcafdf07c1810adb6eb043b
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/7949
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Ajay Kaher <akaher@vmware.com>
@jamescassell
Copy link

Ran into this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants