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

/etc/rc.subr needed in each chroot env #127

Closed
Ximalas opened this issue May 20, 2018 · 0 comments
Closed

/etc/rc.subr needed in each chroot env #127

Ximalas opened this issue May 20, 2018 · 0 comments

Comments

@Ximalas
Copy link
Contributor

Ximalas commented May 20, 2018

I've been seing these messages lately on base/head r333934:

===>   Installing existing package /packages/All/pcre-8.42.txz
Installing pcre-8.42...
Extracting pcre-8.42: ......... done
.: cannot open /etc/rc.subr: No such file or directory
pkg-static: POST-INSTALL script failed
===>   swig30-3.0.12 depends on shared library: libpcre.so - not found

I haven't had time to confirm this beaviour on stable/11.

I believe synth should copy /etc/rc.subr into each chroot env, if only as a precaution. For all I know, this might do more harm than good.

Here's a crude patch for src/replicant.adb. I will try this one shortly.

--- a/src/replicant.adb	2018-05-08 19:44:01.000000000 +0200
+++ b/src/replicant.adb	2018-05-21 00:06:12.779406000 +0200
@@ -838,6 +838,22 @@
    end copy_rc_default;
 
 
+   --------------------
+   --  copy_rc_subr  --
+   --------------------
+   procedure copy_rc_subr (path_to_etc : String)
+   is
+      rc_subr : constant String := "/rc.subr";
+      etc_rc_subr : constant String := "/etc" & rc_subr;
+   begin
+      if not AD.Exists (etc_rc_subr) then
+         return;
+      end if;
+      AD.Copy_File (Source_Name => etc_rc_subr,
+                    Target_Name => path_to_etc & rc_subr);
+   end copy_rc_subr;
+
+
    ---------------------------
    --  create_etc_services  --
    ---------------------------
@@ -1195,6 +1211,7 @@
       populate_var_folder (location (slave_base, var));
       copy_mtree_files    (location (slave_base, etc_mtree));
       copy_rc_default     (location (slave_base, etc));
+      copy_rc_subr        (location (slave_base, etc));
       copy_resolv_conf    (location (slave_base, etc));
       create_make_conf    (location (slave_base, etc), opts.skip_cwrappers);
       create_passwd       (location (slave_base, etc));

No, the problem is most likely elsewhere:

===>   Installing existing package /packages/All/pcre-8.42.txz
Installing pcre-8.42...
Extracting pcre-8.42: ......... done
pkg-static: POST-INSTALL script failed
===>   swig30-3.0.12 depends on shared library: libpcre.so - not found

Well, at least the ports system is able to find /etc/rc.subr. It might be necessary to recreate all packages. Recreating pcre-8.42.txz didn't help. I'll look into this in the morning.


2018-05-21T11:10+0200

To my amazement, running base/head r333967 and ports/head r470515, there are no problems getting pcre-8.42.txz installed in the "isolation chambers". I still see pkg-static: POST-INSTALL script failed in the log files.

Should anyone else run into this problem at this time, then update your source and ports trees and upgrade base before dealing with localbase. I'm sorry for the waste of time.

@Ximalas Ximalas closed this as completed May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant