()
| 767 | } |
| 768 | |
| 769 | func configureRPM() error { |
| 770 | if !utils.PathExists("/usr/lib/rpm/macros.d") { |
| 771 | return nil |
| 772 | } |
| 773 | |
| 774 | logrus.Debug("Configuring RPM to ignore bind mounts") |
| 775 | |
| 776 | var builder strings.Builder |
| 777 | builder.WriteString("# Written by Toolbx\n") |
| 778 | builder.WriteString("# https://containertoolbx.org/\n") |
| 779 | builder.WriteString("\n") |
| 780 | builder.WriteString("%_netsharedpath /dev:/media:/mnt:/proc:/sys:/tmp:/var/lib/flatpak:/var/lib/libvirt\n") |
| 781 | |
| 782 | rpmConfigString := builder.String() |
| 783 | rpmConfigBytes := []byte(rpmConfigString) |
| 784 | if err := ioutil.WriteFile("/usr/lib/rpm/macros.d/macros.toolbox", rpmConfigBytes, 0644); err != nil { |
| 785 | return fmt.Errorf("failed to configure RPM to ignore bind mounts: %w", err) |
| 786 | } |
| 787 | |
| 788 | return nil |
| 789 | } |
| 790 | |
| 791 | func configureUsers(targetUserUid int, targetUser, targetUserHome, targetUserShell string, homeLink bool) error { |
| 792 | if homeLink { |
no outgoing calls
no test coverage detected
searching dependent graphs…