Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
metadata-collect-agent
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
Xiaowu Zhang
metadata-collect-agent
Commits
e7bec916
Commit
e7bec916
authored
Mar 31, 2021
by
Xiaowu Zhang
Committed by
root
Mar 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add script to compile
parent
cd0a8d1d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
4 deletions
+69
-4
debian.package.unsafe/unsafe-boot-metadata-collect-agent/sbin/metadata-collect-agent
...e-boot-metadata-collect-agent/sbin/metadata-collect-agent
+1
-0
dracut.module/dracut.conf
dracut.module/dracut.conf
+2
-2
install.sh
install.sh
+64
-0
rust-build-static.bash
rust-build-static.bash
+2
-2
No files found.
debian.package.unsafe/unsafe-boot-metadata-collect-agent/sbin/metadata-collect-agent
0 → 120000
View file @
e7bec916
/root/metadata-collect-agent/target/x86_64-unknown-linux-musl/release/metadata-collect-agent
\ No newline at end of file
dracut.module/dracut.conf
View file @
e7bec916
...
...
@@ -5,6 +5,6 @@ reproducible=yes
compress
=
xz
uefi
=
yes
uefi_stub
=/
usr
/
lib
/
systemd
/
boot
/
efi
/
linuxx64
.
efi
.
stub
uefi_secureboot_cert
=/
root
/
db
.
crt
uefi_secureboot_key
=/
root
/
db
.
key
uefi_secureboot_cert
=/
etc
/
uefi
-
key
/
db
.
crt
uefi_secureboot_key
=/
etc
/
uefi
-
key
/
db
.
key
add_dracutmodules
=
"metadata-collect"
install.sh
0 → 100755
View file @
e7bec916
#!/bin/bash
set
-eux
apt-get
install
make autopoint autoconf libtool libattr1.dev musl-tools sbsigntool
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut-core_051-1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut_051-1_all.deb
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut-network_051-1_all.deb
apt
install
./dracut-core_051-1_amd64.deb ./dracut_051-1_all.deb ./dracut-network_051-1_all.deb
rm
dracut-core_051-1_amd64.deb dracut_051-1_all.deb dracut-network_051-1_all.deb
if
[
!
-e
"
$HOME
/.cargo/bin"
]
;
then
curl
--proto
'=https'
--tlsv1
.2
-sSf
https://sh.rustup.rs | sh
fi
export
PATH
=
$PATH
:
$HOME
/.cargo/bin
rustup target add x86_64-unknown-linux-musl
echo
"Enter ERP5 User"
read
ERP5_USER
echo
"Enter ERP5 Password"
read
ERP5_PASS
echo
"Enter ERP5 Base Url"
read
ERP5_BASE_URL
export
ERP5_USER
=
$ERP5_USER
export
ERP5_PASS
=
$ERP5_PASS
export
ERP5_BASE_URL
=
$ERP5_BASE_URL
if
[
!
-e
/etc/uefi-key
]
;
then
mkdir
/etc/uefi-key
fi
if
[
!
-e
/etc/uefi-key/db.crt
]
;
then
openssl req
-newkey
rsa:4096
-nodes
-keyout
/etc/uefi-key/db.key
-new
-x509
-sha256
-days
36500
-subj
"/CN=TEST"
-out
/etc/uefi-key/db.crt
openssl x509
-outform
DER
-in
/etc/uefi-key/db.crt
-out
/etc/uefi-key/db.cer
fi
cd
dracut.module
make
install
cd
..
rm
-rf
dracut_tmp
mkdir
dracut_tmp
disk_info
=
$(
/sbin/fdisk
-l
|
grep
'^/dev'
|
cut
-d
' '
-f1
)
disk_info_list
=(
${
disk_info
//
' '
/
}
)
/sbin/e2label
${
disk_info_list
[1]
}
ROOT
dracut
--force
-c
./dracut.module/dracut.conf
--confdir
dracut_tmp
cp
-r
/boot/efi/EFI /EFI
uefi
=
$(
ls
/EFI/Linux
)
efibootmgr
--quiet
--create
--disk
${
disk_info_list
[0]
}
--label
'debian UEFI'
--loader
/EFI/Linux/
$uefi
rust-build-static.bash
View file @
e7bec916
...
...
@@ -31,5 +31,5 @@ BINARY="$(pwd)/target/$HOST_TARGET/release/$(basename "$(pwd)")"
strip
--strip-all
"
$BINARY
"
objdump
-T
"
$BINARY
"
||
true
ln
-s
"
$BINARY
"
dracut.module/90metadata-collect/metadata-collect-agent
||
true
ln
-s
"
$BINARY
"
debian.package.unsafe/unsafe-boot-metadata-collect-agent/sbin/metadata-collect-agent
||
true
\ No newline at end of file
ln
-sf
"
$BINARY
"
dracut.module/90metadata-collect/metadata-collect-agent
||
true
ln
-sf
"
$BINARY
"
debian.package.unsafe/unsafe-boot-metadata-collect-agent/sbin/metadata-collect-agent
||
true
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