From fbf9f4e802fa66327b60cdae1136c549b6344b8c Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 16 Nov 2024 10:30:30 -0600 Subject: [PATCH] add mirrors.wit.com example. add noarch --- examples/mirrors.wit.com/Makefile | 11 ++++++++ examples/mirrors.wit.com/build | 11 ++++++++ examples/mirrors.wit.com/control | 11 ++++++++ examples/mirrors.wit.com/wit-sid.asc | 41 ++++++++++++++++++++++++++++ examples/mirrors.wit.com/wit.list | 4 +++ examples/protoc-gen-go/Makefile | 5 ++++ examples/protoc-gen-go/control | 7 +++-- readControlFile.go | 5 ++++ 8 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 examples/mirrors.wit.com/Makefile create mode 100755 examples/mirrors.wit.com/build create mode 100644 examples/mirrors.wit.com/control create mode 100644 examples/mirrors.wit.com/wit-sid.asc create mode 100644 examples/mirrors.wit.com/wit.list diff --git a/examples/mirrors.wit.com/Makefile b/examples/mirrors.wit.com/Makefile new file mode 100644 index 0000000..d28f0e1 --- /dev/null +++ b/examples/mirrors.wit.com/Makefile @@ -0,0 +1,11 @@ +.PHONY: build + +all: build + +build: + go-deb --repo . + +# use the ncurses gui (only kinda works still) +ncurses: + go-deb --gui gocui --repo . + diff --git a/examples/mirrors.wit.com/build b/examples/mirrors.wit.com/build new file mode 100755 index 0000000..9c92253 --- /dev/null +++ b/examples/mirrors.wit.com/build @@ -0,0 +1,11 @@ +#!/bin/bash -x + +# these are the keys and files you need +# +# to be able to apt install packages from mirrors.wit.com + +mkdir -p files/etc/apt/trusted.gpg.d/ +cp wit-sid.asc files/etc/apt/trusted.gpg.d/ + +mkdir -p files/etc/apt/sources.list.d/ +cp wit.list files/etc/apt/sources.list.d/ diff --git a/examples/mirrors.wit.com/control b/examples/mirrors.wit.com/control new file mode 100644 index 0000000..9cfe939 --- /dev/null +++ b/examples/mirrors.wit.com/control @@ -0,0 +1,11 @@ +Build-Depends: +Package: mirrors.wit.com +Maintainer: Jeff Carr +Packager: Jeff Carr +Architecture: noarch +Depends: +URL: https://mirrors.wit.com/ +Recommends: +Version: 0.0.3 +Description: apt keys and source file + This was packaged with go-deb from go.wit.com diff --git a/examples/mirrors.wit.com/wit-sid.asc b/examples/mirrors.wit.com/wit-sid.asc new file mode 100644 index 0000000..7f50c36 --- /dev/null +++ b/examples/mirrors.wit.com/wit-sid.asc @@ -0,0 +1,41 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGNBGclJM8BDAC2IEoi7FeQjqOUXliXEwwbtpCpMpRFHBNGtY475Noah/HY12AI +xirECOjWoD3CojsGEvP7L+QUYa/XsRv35SqSS36ZpTnT9+8PD/I3Ezsp/6Obqahs +ojJy+17KqhOLsK5XfdU1v8fuQ7/0ebn6xsDt+shSpOFxwwF0LNI8BJgTU7+jVhPK +l7IE6CC3RdjJGJG35BBHPFMR1UlVM2PU2JQv7RLLAoufkKMmxI7TAi8CGpjU2RvL +cqndnaH9HJ9qvEBdoz2MfV3lbHeFGMpr3oqu9Xw6tJ4WR3ERaxBZZh+l9vuIWyK1 +1JnOC0SzmSD36htPBab7pcyqNosb1tkohxxLs4yHfy1BdiGJPxIHrozCsrpGCNA2 +ZrHr8wC1YvSm4Wn7nwwnrRejfyD/nYfwVARPqtkO+7tgKYmru7bPeIO5nycuyQ2g +kj8n5vNE+LFWxUt8fF/V0trFhukToLPzRfwOQuSj7KIUW+T3vwEc4+eX1mV1Hnct +MxgY098mAe20a5cAEQEAAbQaV0lULkNPTSBJbmMuIDx3aXRAd2l0LmNvbT6JAdQE +EwEKAD4WIQT0WUi7TlHJDYROjjEzhflOKwj/7AUCZyUkzwIbAwUJEswDAAULCQgH +AgYVCgkICwIEFgIDAQIeAQIXgAAKCRAzhflOKwj/7GKFC/42QgMrDTKJ/m3elMj+ +B1ezXvUppmUD4s8oosCZ3bX/Mh9XmMAp60nMq5IF8ZbQjwBxupBw/0QyELvHUIWI +F6mmGgDiTMhgT6M8jmno4XnhN2iR64I3z2SoSWfZVDO+0gpy3RIcifFU+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7R9mIKmKmcDMKc3ReBb3w4O8n1HARGNT8euPGEI +sLczLUXZeffAKzDaMsnWMT7yV7mr4QmXW8nuLaYE7AjA2Cl7vnV6a8Uz8r9NJSqd +2vJb/dBfCRH4FQGOS8o2oCSlKmSnqLKXZGhWUcgzkmHKkj2H0t7XdS/UDlVPWXQv +9eUD8MXxPeH7R00Yubn8sMQeaygmrxkIeWk/l1Rh+2Fwc63+uL3FbREQyRxwNuSp +Gx8vuxdbJyUgUbetcjSO2ySKe/3n5N4kzgS0m+/BQ+3dFbZz6x7qIrQzlRxXdH/C +HPa281thIR/0RHp7VH7yMlzh/iTbOhmyo13F8pcJ9IIKgBBGE5fZDeHri1/8eNEY +PI+QhFxd3KZ7dnFrrq1NsXRWk2SfIl5fh1Mk/gPSf2cppkEDKg0cOP2HQOQ3cqUL +X4aT7W+u+dxTCOk1pVyKT3Vo +=N1/z +-----END PGP PUBLIC KEY BLOCK----- diff --git a/examples/mirrors.wit.com/wit.list b/examples/mirrors.wit.com/wit.list new file mode 100644 index 0000000..f1b6db6 --- /dev/null +++ b/examples/mirrors.wit.com/wit.list @@ -0,0 +1,4 @@ +deb http://mirrors.wit.com/wit/ sid main +# deb-src http://mirrors.wit.com/wit/ sid main + +# cp apt-wit.list /etc/apt/sources.list.d/ diff --git a/examples/protoc-gen-go/Makefile b/examples/protoc-gen-go/Makefile index 92a3852..d28f0e1 100644 --- a/examples/protoc-gen-go/Makefile +++ b/examples/protoc-gen-go/Makefile @@ -4,3 +4,8 @@ all: build build: go-deb --repo . + +# use the ncurses gui (only kinda works still) +ncurses: + go-deb --gui gocui --repo . + diff --git a/examples/protoc-gen-go/control b/examples/protoc-gen-go/control index df51b5d..c1090d5 100644 --- a/examples/protoc-gen-go/control +++ b/examples/protoc-gen-go/control @@ -1,12 +1,13 @@ Source: google.golang.org.protobuf Build-Depends: golang -Package: protoc-gen-go-new +Package: protoc-gen-go-wit Maintainer: Jeff Carr Packager: Jeff Carr Architecture: amd64 -Depends: +Depends: protobuf-compiler URL: https://go.wit.com/ Recommends: -Version: 0.1 +Version: 0.0.3 Description: protoc-gen-go from google.golang.org/protobuf You need this one until the debian sid packages are updated + I didn't change anything, it's a straight build from the sources. diff --git a/readControlFile.go b/readControlFile.go index 8876d64..84008a4 100644 --- a/readControlFile.go +++ b/readControlFile.go @@ -75,6 +75,11 @@ func (c *controlBox) readControlFile() error { case "Architecture": if c.Architecture.String() != value { log.Warn("not sure what to do with Architecture", c.Architecture.String(), value) + if value == "noarch" { + log.Warn("attempting to set noarch") + c.Architecture.SetText(value) + } + } default: log.Warn("error unknown key", key, "value:", value)