Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
supermin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
supermin
Commits
cc31ea8a
Commit
cc31ea8a
authored
Apr 23, 2020
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
200 additions
and
0 deletions
+200
-0
Makefile
Makefile
+8
-0
supermin-5.2.0-certo.patch
supermin-5.2.0-certo.patch
+192
-0
supermin-5.2.0.tar.gz
supermin-5.2.0.tar.gz
+0
-0
No files found.
Makefile
0 → 100644
View file @
cc31ea8a
all
:
tar
xf supermin-5.2.0.tar.gz
patch
-Np1
-d
supermin-5.2.0 < supermin-5.2.0-certo.patch
cd
supermin-5.2.0
&&
./configure
--prefix
=
/usr
$(MAKE)
-C
supermin-5.2.0
$(MAKE)
-C
supermin-5.2.0 check
$(MAKE)
-C
supermin-5.2.0
install
rm
-rf
supermin-5.2.0
supermin-5.2.0-certo.patch
0 → 100644
View file @
cc31ea8a
diff -uNr supermin-5.2.0.original/src/.depend supermin-5.2.0-certo/src/.depend
--- supermin-5.2.0.original/src/.depend 2020-03-10 10:28:53.000000000 +0000
+++ supermin-5.2.0-certo/src/.depend 2020-04-15 09:31:34.000000000 +0000
@@ -48,6 +48,9 @@
./ph_rpm.cmi :
./ph_rpm.cmo : utils.cmi package_handler.cmi os_release.cmi librpm.cmi config.cmo ./ph_rpm.cmi
./ph_rpm.cmx : utils.cmx package_handler.cmx os_release.cmx librpm.cmx config.cmx ./ph_rpm.cmi
+./ph_pkg.cmi :
+./ph_pkg.cmo : utils.cmi package_handler.cmi os_release.cmi config.cmo ./ph_pkg.cmi
+./ph_pkg.cmx : utils.cmx package_handler.cmx os_release.cmx config.cmx ./ph_pkg.cmi
./realpath.cmi :
./realpath.cmo : ./realpath.cmi
./realpath.cmx : ./realpath.cmi
diff -uNr supermin-5.2.0.original/src/Makefile.am supermin-5.2.0-certo/src/Makefile.am
--- supermin-5.2.0.original/src/Makefile.am 2017-08-24 12:28:08.000000000 +0000
+++ supermin-5.2.0-certo/src/Makefile.am 2020-04-15 09:31:34.000000000 +0000
@@ -54,6 +54,8 @@
ph_dpkg.mli \
ph_pacman.ml \
ph_pacman.mli \
+ ph_pkg.ml \
+ ph_pkg.mli \
mode_prepare.ml \
mode_prepare.mli \
format_chroot.ml \
@@ -86,6 +88,7 @@
ph_rpm.ml \
ph_dpkg.ml \
ph_pacman.ml \
+ ph_pkg.ml \
mode_prepare.ml \
format_chroot.ml \
format_ext2_init.ml \
diff -uNr supermin-5.2.0.original/src/Makefile.in supermin-5.2.0-certo/src/Makefile.in
--- supermin-5.2.0.original/src/Makefile.in 2020-03-10 10:28:40.000000000 +0000
+++ supermin-5.2.0-certo/src/Makefile.in 2020-04-15 09:31:34.000000000 +0000
@@ -1008,6 +1008,8 @@
ph_dpkg.mli \
ph_pacman.ml \
ph_pacman.mli \
+ ph_pkg.ml \
+ ph_pkg.mli \
mode_prepare.ml \
mode_prepare.mli \
format_chroot.ml \
@@ -1041,6 +1043,7 @@
ph_rpm.ml \
ph_dpkg.ml \
ph_pacman.ml \
+ ph_pkg.ml \
mode_prepare.ml \
format_chroot.ml \
format_ext2_init.ml \
diff -uNr supermin-5.2.0.original/src/ph_pkg.ml supermin-5.2.0-certo/src/ph_pkg.ml
--- supermin-5.2.0.original/src/ph_pkg.ml 1970-01-01 00:00:00.000000000 +0000
+++ supermin-5.2.0-certo/src/ph_pkg.ml 2020-04-17 10:06:32.000000000 +0000
@@ -0,0 +1,109 @@
+(* supermin 5
+ * Copyright (C) 2009-2014 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *)
+
+open Unix
+open Printf
+
+open Utils
+open Package_handler
+
+let pkg_detect () =
+ try (stat "/usr/share/packages").st_kind = S_DIR with Unix_error _ -> false
+
+type dpkg_t = {
+ name : string;
+}
+
+(* Memo from package type to internal dpkg_t. *)
+let dpkg_of_pkg, pkg_of_dpkg = get_memo_functions ()
+
+let dpkg_packages = Hashtbl.create 13
+let pkg_package_of_string str =
+ if Hashtbl.length dpkg_packages == 0 then (
+ let cmd = sprintf "/usr/sbin/pkglist" in
+ let lines = run_command_get_lines cmd in
+ List.iter (
+ fun line ->
+ match string_split " " line with
+ | [ name ] ->
+ let dpkg = { name = name } in
+ Hashtbl.add dpkg_packages name dpkg
+ | _ -> ();
+ ) lines
+ );
+ let candidates = Hashtbl.find_all dpkg_packages str in
+ (* On multiarch setups, only consider the primary architecture *)
+ try
+ let pkg = List.find (
+ fun cand ->
+ cand.name = str
+ ) candidates in
+ Some (pkg_of_dpkg pkg)
+ with
+ Not_found -> None
+
+let pkg_package_to_string pkg =
+ let dpkg = dpkg_of_pkg pkg in
+ sprintf "%s" dpkg.name
+
+let pkg_package_name pkg =
+ let dpkg = dpkg_of_pkg pkg in
+ dpkg.name
+
+let pkg_package_index_name pkg =
+ sprintf "/usr/share/packages/%s.md5" (pkg_package_name pkg)
+
+let pkg_get_package_database_mtime () =
+ 0.0
+
+let pkg_get_all_requires pkgs =
+ pkgs
+
+let pkg_get_all_files pkgs =
+ let cmd =
+ sprintf "cat %s | awk '{ print $2 }' | grep '^/' | grep -v '^/.$' | sort -u"
+ (quoted_list (List.map pkg_package_index_name (PackageSet.elements pkgs))) in
+ let lines = run_command_get_lines cmd in
+ List.map (
+ fun path ->
+ let config =
+ try string_prefix "/etc/" path && (lstat path).st_kind = S_REG
+ with Unix_error _ -> false in
+ { ft_path = path; ft_source_path = path; ft_config = config }
+ ) lines
+
+let pkg_download_package pkg dir =
+ let cmd =
+ sprintf "cat %s | awk '{ print $2 }' | xargs cp --parents -t %s"
+ ( pkg_package_index_name pkg ) dir in
+ run_command cmd
+
+let () =
+ let ph = {
+ ph_detect = pkg_detect;
+ ph_init = (fun s -> ());
+ ph_fini = (fun () -> ());
+ ph_package_of_string = pkg_package_of_string;
+ ph_package_to_string = pkg_package_to_string;
+ ph_package_name = pkg_package_name;
+ ph_get_package_database_mtime = pkg_get_package_database_mtime;
+ ph_get_requires = PHGetAllRequires pkg_get_all_requires;
+ ph_get_files = PHGetAllFiles pkg_get_all_files;
+ ph_download_package = PHDownloadPackage pkg_download_package;
+ } in
+ register_package_handler "certo" "pkg" ph
diff -uNr supermin-5.2.0.original/src/ph_pkg.mli supermin-5.2.0-certo/src/ph_pkg.mli
--- supermin-5.2.0.original/src/ph_pkg.mli 1970-01-01 00:00:00.000000000 +0000
+++ supermin-5.2.0-certo/src/ph_pkg.mli 2020-04-15 09:31:34.000000000 +0000
@@ -0,0 +1,22 @@
+(* supermin 5
+ * Copyright (C) 2009-2016 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *)
+
+(** pkg package handler
+
+ Nothing is exported. This module registers callbacks when it
+ is loaded. *)
supermin-5.2.0.tar.gz
0 → 100644
View file @
cc31ea8a
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment