From 7905bfcde0894a63b9433b3c777e2b255591138f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 14 Oct 2025 04:40:11 -0500 Subject: housecleaning --- Makefile | 3 +- argv.go | 24 +++---- doDistro.go | 11 +--- doEverything.go | 164 ------------------------------------------------ doMake.go | 61 ++++++++++++++++++ doRelease.go | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++ main.go | 38 ++++++++++-- makePackagesFile.go | 70 --------------------- stuff.go | 20 +----- 9 files changed, 286 insertions(+), 280 deletions(-) delete mode 100644 doEverything.go create mode 100644 doRelease.go delete mode 100644 makePackagesFile.go diff --git a/Makefile b/Makefile index 35f34fd..e5cffa5 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,7 @@ GUIVERSION = $(shell git describe --tags) BUILDTIME = $(shell date +%s) all: reset goimports vet install - -try-everything: reset goimports vet build automate-everything + mirrors everything automate-everything: ./mirrors walk diff --git a/argv.go b/argv.go index 4cb8843..a3d3532 100644 --- a/argv.go +++ b/argv.go @@ -17,18 +17,18 @@ import ( var argv args type args struct { - List *EmptyCmd `arg:"subcommand:list" help:"show the packages"` - Walk *WalkCmd `arg:"subcommand:walk" help:"walk the filesystem for new .deb files"` - Update *EmptyCmd `arg:"subcommand:oldway" help:"the old code to update the apt repo"` - Verify *EmptyCmd `arg:"subcommand:verify" help:"verify the pb is accurate and doesn't have errors"` - Incoming *IncomingCmd `arg:"subcommand:incoming" help:"handle the incoming directory"` - MakeDists *EmptyCmd `arg:"subcommand:makedists" help:"make debian mirrors/dists files for 'apt update'"` - Everything *EmptyCmd `arg:"subcommand:everything" help:"do the whole thing needed. nothing more. just everything."` - Newest *EmptyCmd `arg:"subcommand:newest" help:"make a list of the newest .deb packages"` - DryRun bool `arg:"--dry-run" help:"only show what would be packaged"` - Verbose bool `arg:"--verbose" help:"be loud about it"` - Force bool `arg:"--force" help:"rebuild everything"` - Create bool `arg:"--create" help:"create a new .pb file"` + List *EmptyCmd `arg:"subcommand:list" help:"show the packages"` + Walk *WalkCmd `arg:"subcommand:walk" help:"walk the filesystem for new .deb files"` + Verify *EmptyCmd `arg:"subcommand:verify" help:"verify the pb is accurate and doesn't have errors"` + Incoming *IncomingCmd `arg:"subcommand:incoming" help:"handle the incoming directory"` + MakeDists *EmptyCmd `arg:"subcommand:makedists" help:"make debian mirrors/dists files for 'apt update'"` + SignRelease *EmptyCmd `arg:"subcommand:release" help:"make & GPG sign the Release files"` + Everything *EmptyCmd `arg:"subcommand:everything" help:"do the whole thing needed. nothing more. just everything."` + Newest *EmptyCmd `arg:"subcommand:newest" help:"make a list of the newest .deb packages"` + DryRun bool `arg:"--dry-run" help:"only show what would be packaged"` + Verbose bool `arg:"--verbose" help:"be loud about it"` + Force bool `arg:"--force" help:"rebuild everything"` + Create bool `arg:"--create" help:"create a new .pb file"` } type EmptyCmd struct { diff --git a/doDistro.go b/doDistro.go index 20b28fb..f8034cd 100644 --- a/doDistro.go +++ b/doDistro.go @@ -1,14 +1,6 @@ package main -import ( - "fmt" - "os" - "path/filepath" - "strings" - - "go.wit.com/log" -) - +/* func doDistro() error { log.Println("--- Starting Debian repository generation in Go ---") @@ -92,3 +84,4 @@ func doDistro() error { log.Println("--- Repository generation complete! ---") return nil } +*/ diff --git a/doEverything.go b/doEverything.go deleted file mode 100644 index f8d9546..0000000 --- a/doEverything.go +++ /dev/null @@ -1,164 +0,0 @@ -package main - -import ( - "crypto/sha256" - "errors" - "fmt" - "os" - "os/exec" - "path/filepath" - "strings" - "time" - - "go.wit.com/lib/gui/shell" - "go.wit.com/log" -) - -func doEverything() (string, error) { - // log.Info(r, err2) - shell.RunVerbose([]string{"rm", "-rf", "/home/mirrors/wit/dists"}) - // shell.RunVerbose([]string{"rm", "f", "/home/mirrors/wit/dists/sid/InRelease"}) - // shell.RunVerbose([]string{"rm", "f", "/home/mirrors/wit/dists/sid/Release"}) - // shell.RunVerbose([]string{"rm", "f", "/home/mirrors/wit/dists/sid/Release.gpg"}) - - // dists.working/sid/main/binary-amd64 - if err := os.MkdirAll("/home/mirrors/wit/dists/sid/main/binary-amd64", 0755); err != nil { - log.Info("did not work", err) - } else { - log.Info("did work") - } - - if me.pb.BaseDir != "/home/mirrors/wit" { - me.pb.Filename = "/home/mirrors/wit/mirrors.wit.com.pb" - me.pb.BaseDir = "/home/mirrors/wit" - me.pb.Save() - panic("missing /home/mirrors/wit as BaseDir") - } - - if err := os.Chdir(me.pb.BaseDir); err != nil { - me.sh.BadExit("no '"+me.pb.BaseDir+"' directory", err) - } - - if !shell.IsDir("pool/") { - me.sh.BadExit("no "+filepath.Join(me.pb.BaseDir, "pool")+" directory", errors.New("mount -a ? missing wit/pool/")) - } - - log.Info("Processing dir", filepath.Join(me.pb.BaseDir, "pool")) - - // arch := "amd64" - - newest := doGetNewest("amd64") - newest.SortPackage() - thefile := doMakePackagesFile(newest) - fullname := "/home/mirrors/wit/dists/sid/main/binary-amd64/Packages" - if err := os.WriteFile(fullname, []byte(thefile), os.ModePerm); err != nil { - return fullname, err - } - - r, err := shell.RunVerbose([]string{"gzip", "-k", fullname}) - log.Info(r, err) - // r, err := shell.RunVerbose([]string{"gzip", fullname}) - // panic("blah") - // shell.RunVerbose([]string{"bzip2", "-k", fullname}) - // shell.RunVerbose([]string{"bzip2", fullname}) - - allfiles, _ := FindFiles("dists/sid/main") - for i, filename := range allfiles { - log.Info(i, filename) - } - - releasePath := filepath.Join("/home/mirrors/wit/dists/sid", "Release") - - rfile, _ := os.OpenFile(releasePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) - fmt.Fprintf(rfile, "Origin: WIT.COM Debian Sid\n") - fmt.Fprintf(rfile, "Label: WIT.COM Debian Sid\n") - fmt.Fprintf(rfile, "Suite: sid\n") - fmt.Fprintf(rfile, "Codename: sid\n") - fmt.Fprintf(rfile, "Date: %s\n", time.Now().UTC().Format(time.RFC1123Z)) - fmt.Fprintf(rfile, "Architectures: riscv64 amd64 arm64 all\n") - fmt.Fprintf(rfile, "Components: main\n") - fmt.Fprintf(rfile, "Description: Tooling for RiscV, Semiconductor Designs & Private Clouds\n") - - /* - fmt.Fprintf(rfile, "MD5SUM:\n") - for i, filename := range allfiles { - log.Info(i, filename) - fileBytes, _ := os.ReadFile(filename) - sum := fmt.Sprintf("%x", md5.Sum(fileBytes)) // deprecated - newfile := strings.TrimPrefix(filename, "dists/sid/") - fmt.Fprintf(rfile, " %s %d %s\n", sum, len(fileBytes), newfile) - } - fmt.Fprintf(rfile, "SHA1:\n") - for i, filename := range allfiles { - log.Info(i, filename) - fileBytes, _ := os.ReadFile(filename) - sum := fmt.Sprintf("%x", sha1.Sum(fileBytes)) - newfile := strings.TrimPrefix(filename, "dists/sid/") - fmt.Fprintf(rfile, " %s %d %s\n", sum, len(fileBytes), newfile) - } - */ - fmt.Fprintf(rfile, "SHA256:\n") - for i, filename := range allfiles { - log.Info(i, filename) - fileBytes, _ := os.ReadFile(filename) - sum := fmt.Sprintf("%x", sha256.Sum256(fileBytes)) - newfile := strings.TrimPrefix(filename, "dists/sid/") - fmt.Fprintf(rfile, " %s %d %s\n", sum, len(fileBytes), newfile) - } - // fmt.Fprintf(rfile, "SHA1:\n") - // fmt.Fprintf(rfile, "SHA256:\n") - rfile.Close() - - // Sign the file - log.Println("Signing with GPG key:", gpgKeyID) - - distPath := "/home/mirrors/wit/dists/sid" - // Create InRelease - cmdClearSign := exec.Command("gpg", "--default-key", gpgKeyID, "--clearsign", "-o", filepath.Join(distPath, "InRelease"), releasePath) - if err := runCommand(cmdClearSign); err != nil { - log.Printf("failed to create InRelease: %v\n", err) - } - - // Create Release.gpg - cmdDetachedSign := exec.Command("gpg", "--default-key", gpgKeyID, "-abs", "-o", filepath.Join(distPath, "Release.gpg"), releasePath) - if err := runCommand(cmdDetachedSign); err != nil { - log.Printf("failed to create Release.gpg: %v\n", err) - } - /* - var sum string - switch name { - case "MD5Sum": - sum = fmt.Sprintf("%x", md5.Sum(fileBytes)) - case "SHA1": - sum = fmt.Sprintf("%x", sha1.Sum(fileBytes)) - case "SHA256": - // FIX 3: Use the correct sha256.Sum256 function. - sum = fmt.Sprintf("%x", sha256.Sum256(fileBytes)) - */ - - log.Info("Package file:", fullname) - log.Info("Release file:", releasePath) - log.Info("InRelease file:", filepath.Join(distPath, "InRelease")) - cmd := []string{"apt-get", "update"} - cmd = append(cmd, "-o", "Dir::Etc::sourcelist=/etc/apt/sources.list.d/wit.list") - cmd = append(cmd, "-o", "Dir::Etc::sourceparts=/dev/null") - cmd = append(cmd, "-o", "APT::Get::List-Cleanup=0") - log.Info("apt update :", cmd) - log.Info("") - log.Info("Finished Everything") - log.Info("") - - if argv.Verbose { - log.Info("") - shell.RunVerbose(cmd) - log.Info("") - log.Info("") - log.Info("Local file:", "/var/lib/apt/lists/mirrors.wit.com_wit_dists_sid_main_binary-amd64_Packages") - log.Info("") - shell.RunVerbose([]string{"head", "-n", "15", "/var/lib/apt/lists/mirrors.wit.com_wit_dists_sid_main_binary-amd64_Packages"}) - log.Info("apt install :", "apt install wit-tools") - log.Info("") - } - - return "did everything", nil -} diff --git a/doMake.go b/doMake.go index 76ba16e..cc4c963 100644 --- a/doMake.go +++ b/doMake.go @@ -1,12 +1,20 @@ package main import ( + "crypto/md5" + "crypto/sha256" + "errors" + "fmt" + "io" "os" + "path/filepath" "strings" "go.wit.com/lib/debian" + "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/zoopb" "go.wit.com/log" + "google.golang.org/protobuf/types/known/timestamppb" ) // os.Chdir(me.mirrorsDir) @@ -48,3 +56,56 @@ func doMakePackagesFile(all *zoopb.Packages) string { } return pfile } + +func populateDebInfo(p *zoopb.Package) error { + // SIMPLE SANITY CHECKS + if p.DebInfo != nil { + // already added p.DebInfo + return nil + } + fullname := filepath.Join(me.pb.BaseDir, p.Filename) + cmd := []string{"dpkg", "-I", fullname} + r := shell.Run(cmd) + if r.Error != nil { + return r.Error + } + if r.Exit != 0 { + return errors.New("dpkg returned -1") + } + stat, err := os.Stat(fullname) + if err != nil { + return err + } + filedata, err := os.Open(fullname) + if err != nil { + return err + } + defer filedata.Close() + // SIMPLE SANITY CHECKS END + + // SHA256 HASH + p.DebInfo = new(zoopb.DebInfo) + + hSHA256 := sha256.New() + hMD5 := md5.New() // probably deprecate, but love md5sum too much + // hSHA1 := sha1.New() // deprecated + + // TeeReader allows writing to multiple hashers at once + // multiWriter := io.MultiWriter(hMD5, hSHA1, hSHA256) + multiWriter := io.MultiWriter(hSHA256, hMD5) + if _, err := io.Copy(multiWriter, filedata); err != nil { + return err + } + p.DebInfo.SHA256 = fmt.Sprintf("%x", hSHA256.Sum(nil)) // should be the standard now + p.DebInfo.MD5SUM = fmt.Sprintf("%x", hMD5.Sum(nil)) // probably deprecate + // p.DebInfo.SHA1 = fmt.Sprintf("%x", hSHA1.Sum(nil)) // deprecated + // SHA256 HASH END + + // set file create time + p.Ctime = timestamppb.New(stat.ModTime()) + + // PARSE "dpkg -I ", then exit as we are done + all := strings.Join(r.Stdout, "\n") + debian.ParseDpkgOutputIntoPB(p, all) + return nil +} diff --git a/doRelease.go b/doRelease.go new file mode 100644 index 0000000..887dab9 --- /dev/null +++ b/doRelease.go @@ -0,0 +1,175 @@ +package main + +import ( + "bytes" + "crypto/sha256" + "errors" + "fmt" + "os" + "os/exec" + "path/filepath" + "strings" + "time" + + "go.wit.com/lib/gui/shell" + "go.wit.com/log" +) + +func doRelease() (string, error) { + // log.Info(r, err2) + shell.RunVerbose([]string{"rm", "-rf", "/home/mirrors/wit/dists"}) + // shell.RunVerbose([]string{"rm", "f", "/home/mirrors/wit/dists/sid/InRelease"}) + // shell.RunVerbose([]string{"rm", "f", "/home/mirrors/wit/dists/sid/Release"}) + // shell.RunVerbose([]string{"rm", "f", "/home/mirrors/wit/dists/sid/Release.gpg"}) + + // dists.working/sid/main/binary-amd64 + if err := os.MkdirAll("/home/mirrors/wit/dists/sid/main/binary-amd64", 0755); err != nil { + log.Info("did not work", err) + } else { + log.Info("did work") + } + + if me.pb.BaseDir != "/home/mirrors/wit" { + me.pb.Filename = "/home/mirrors/wit/mirrors.wit.com.pb" + me.pb.BaseDir = "/home/mirrors/wit" + me.pb.Save() + panic("missing /home/mirrors/wit as BaseDir") + } + + if err := os.Chdir(me.pb.BaseDir); err != nil { + me.sh.BadExit("no '"+me.pb.BaseDir+"' directory", err) + } + + if !shell.IsDir("pool/") { + me.sh.BadExit("no "+filepath.Join(me.pb.BaseDir, "pool")+" directory", errors.New("mount -a ? missing wit/pool/")) + } + + log.Info("Processing dir", filepath.Join(me.pb.BaseDir, "pool")) + + // arch := "amd64" + + newest := doGetNewest("amd64") + newest.SortPackage() + thefile := doMakePackagesFile(newest) + fullname := "/home/mirrors/wit/dists/sid/main/binary-amd64/Packages" + if err := os.WriteFile(fullname, []byte(thefile), os.ModePerm); err != nil { + return fullname, err + } + + r, err := shell.RunVerbose([]string{"gzip", "-k", fullname}) + log.Info(r, err) + // r, err := shell.RunVerbose([]string{"gzip", fullname}) + // panic("blah") + // shell.RunVerbose([]string{"bzip2", "-k", fullname}) + // shell.RunVerbose([]string{"bzip2", fullname}) + + allfiles, _ := FindFiles("dists/sid/main") + for i, filename := range allfiles { + log.Info(i, filename) + } + + releasePath := filepath.Join("/home/mirrors/wit/dists/sid", "Release") + + rfile, _ := os.OpenFile(releasePath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) + fmt.Fprintf(rfile, "Origin: WIT.COM Debian Sid\n") + fmt.Fprintf(rfile, "Label: WIT.COM Debian Sid\n") + fmt.Fprintf(rfile, "Suite: sid\n") + fmt.Fprintf(rfile, "Codename: sid\n") + fmt.Fprintf(rfile, "Date: %s\n", time.Now().UTC().Format(time.RFC1123Z)) + fmt.Fprintf(rfile, "Architectures: riscv64 amd64 arm64 all\n") + fmt.Fprintf(rfile, "Components: main\n") + fmt.Fprintf(rfile, "Description: Tooling for RiscV, Semiconductor Designs & Private Clouds\n") + + /* + fmt.Fprintf(rfile, "MD5SUM:\n") + for i, filename := range allfiles { + log.Info(i, filename) + fileBytes, _ := os.ReadFile(filename) + sum := fmt.Sprintf("%x", md5.Sum(fileBytes)) // deprecated + newfile := strings.TrimPrefix(filename, "dists/sid/") + fmt.Fprintf(rfile, " %s %d %s\n", sum, len(fileBytes), newfile) + } + fmt.Fprintf(rfile, "SHA1:\n") + for i, filename := range allfiles { + log.Info(i, filename) + fileBytes, _ := os.ReadFile(filename) + sum := fmt.Sprintf("%x", sha1.Sum(fileBytes)) + newfile := strings.TrimPrefix(filename, "dists/sid/") + fmt.Fprintf(rfile, " %s %d %s\n", sum, len(fileBytes), newfile) + } + */ + fmt.Fprintf(rfile, "SHA256:\n") + for i, filename := range allfiles { + log.Info(i, filename) + fileBytes, _ := os.ReadFile(filename) + sum := fmt.Sprintf("%x", sha256.Sum256(fileBytes)) + newfile := strings.TrimPrefix(filename, "dists/sid/") + fmt.Fprintf(rfile, " %s %d %s\n", sum, len(fileBytes), newfile) + } + // fmt.Fprintf(rfile, "SHA1:\n") + // fmt.Fprintf(rfile, "SHA256:\n") + rfile.Close() + + // Sign the file + log.Println("Signing with GPG key:", gpgKeyID) + + distPath := "/home/mirrors/wit/dists/sid" + // Create InRelease + cmdClearSign := exec.Command("gpg", "--default-key", gpgKeyID, "--clearsign", "-o", filepath.Join(distPath, "InRelease"), releasePath) + if err := runCommand(cmdClearSign); err != nil { + log.Printf("failed to create InRelease: %v\n", err) + } + + // Create Release.gpg + cmdDetachedSign := exec.Command("gpg", "--default-key", gpgKeyID, "-abs", "-o", filepath.Join(distPath, "Release.gpg"), releasePath) + if err := runCommand(cmdDetachedSign); err != nil { + log.Printf("failed to create Release.gpg: %v\n", err) + } + /* + var sum string + switch name { + case "MD5Sum": + sum = fmt.Sprintf("%x", md5.Sum(fileBytes)) + case "SHA1": + sum = fmt.Sprintf("%x", sha1.Sum(fileBytes)) + case "SHA256": + // FIX 3: Use the correct sha256.Sum256 function. + sum = fmt.Sprintf("%x", sha256.Sum256(fileBytes)) + */ + + log.Info("Package file:", fullname) + log.Info("Release file:", releasePath) + log.Info("InRelease file:", filepath.Join(distPath, "InRelease")) + cmd := []string{"apt-get", "update"} + cmd = append(cmd, "-o", "Dir::Etc::sourcelist=/etc/apt/sources.list.d/wit.list") + cmd = append(cmd, "-o", "Dir::Etc::sourceparts=/dev/null") + cmd = append(cmd, "-o", "APT::Get::List-Cleanup=0") + log.Info("apt update :", cmd) + log.Info("") + log.Info("Finished Everything") + log.Info("") + + if argv.Verbose { + log.Info("") + shell.RunVerbose(cmd) + log.Info("") + log.Info("") + log.Info("Local file:", "/var/lib/apt/lists/mirrors.wit.com_wit_dists_sid_main_binary-amd64_Packages") + log.Info("") + shell.RunVerbose([]string{"head", "-n", "15", "/var/lib/apt/lists/mirrors.wit.com_wit_dists_sid_main_binary-amd64_Packages"}) + log.Info("apt install :", "apt install wit-tools") + log.Info("") + } + + return "did everything", nil +} + +func runCommand(cmd *exec.Cmd) error { + var stderr bytes.Buffer + cmd.Stderr = &stderr + err := cmd.Run() + if err != nil { + return fmt.Errorf("command '%s' failed: %v\nStderr: %s", cmd.String(), err, stderr.String()) + } + return nil +} diff --git a/main.go b/main.go index fc14458..60f7480 100644 --- a/main.go +++ b/main.go @@ -9,6 +9,7 @@ import ( "go.wit.com/lib/gui/prep" "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/zoopb" + "go.wit.com/log" ) // sent via -ldflags @@ -96,16 +97,43 @@ func main() { s, err = doVerify() } - if argv.Update != nil { - err = doDistro() - } - if argv.MakeDists != nil { s, err = doMakeDists() } + if argv.SignRelease != nil { + s, err = doRelease() + } + if argv.Everything != nil { - s, err = doEverything() + s, err = doWalk() + if err != nil { + me.sh.BadExit(s, err) + } + s, err = doIncoming(me.pb) + if err != nil { + me.sh.BadExit(s, err) + } + // a second time, files from incoming should have + // been moved now + s, err = doWalk() + if err != nil { + me.sh.BadExit(s, err) + } + + // verify all the packages + s, err = doVerify() + if err != nil { + me.sh.BadExit(s, err) + } + + // print a table of the newest packages + all := doGetNewest("amd64") + s = "newest .deb files table: " + all.PrintTable() + log.Info("newest files are:", s) + + // make and GPG sign the Release files + s, err = doRelease() } if err != nil { diff --git a/makePackagesFile.go b/makePackagesFile.go deleted file mode 100644 index a2d1173..0000000 --- a/makePackagesFile.go +++ /dev/null @@ -1,70 +0,0 @@ -package main - -import ( - "crypto/md5" - "crypto/sha256" - "errors" - "fmt" - "io" - "os" - "path/filepath" - "strings" - - "go.wit.com/lib/debian" - "go.wit.com/lib/gui/shell" - "go.wit.com/lib/protobuf/zoopb" - "google.golang.org/protobuf/types/known/timestamppb" -) - -func populateDebInfo(p *zoopb.Package) error { - // SIMPLE SANITY CHECKS - if p.DebInfo != nil { - // already added p.DebInfo - return nil - } - fullname := filepath.Join(me.pb.BaseDir, p.Filename) - cmd := []string{"dpkg", "-I", fullname} - r := shell.Run(cmd) - if r.Error != nil { - return r.Error - } - if r.Exit != 0 { - return errors.New("dpkg returned -1") - } - stat, err := os.Stat(fullname) - if err != nil { - return err - } - filedata, err := os.Open(fullname) - if err != nil { - return err - } - defer filedata.Close() - // SIMPLE SANITY CHECKS END - - // SHA256 HASH - p.DebInfo = new(zoopb.DebInfo) - - hSHA256 := sha256.New() - hMD5 := md5.New() // probably deprecate, but love md5sum too much - // hSHA1 := sha1.New() // deprecated - - // TeeReader allows writing to multiple hashers at once - // multiWriter := io.MultiWriter(hMD5, hSHA1, hSHA256) - multiWriter := io.MultiWriter(hSHA256, hMD5) - if _, err := io.Copy(multiWriter, filedata); err != nil { - return err - } - p.DebInfo.SHA256 = fmt.Sprintf("%x", hSHA256.Sum(nil)) // should be the standard now - p.DebInfo.MD5SUM = fmt.Sprintf("%x", hMD5.Sum(nil)) // probably deprecate - // p.DebInfo.SHA1 = fmt.Sprintf("%x", hSHA1.Sum(nil)) // deprecated - // SHA256 HASH END - - // set file create time - p.Ctime = timestamppb.New(stat.ModTime()) - - // PARSE "dpkg -I ", then exit as we are done - all := strings.Join(r.Stdout, "\n") - debian.ParseDpkgOutputIntoPB(p, all) - return nil -} diff --git a/stuff.go b/stuff.go index 0458b05..0877e76 100644 --- a/stuff.go +++ b/stuff.go @@ -1,23 +1,6 @@ package main -import ( - "bufio" - "bytes" - "compress/gzip" - "crypto/md5" - "crypto/sha1" - "crypto/sha256" - "fmt" - "io" - "os" - "os/exec" - "path/filepath" - "strings" - "time" - - "go.wit.com/log" -) - +/* func runCommand(cmd *exec.Cmd) error { var stderr bytes.Buffer cmd.Stderr = &stderr @@ -238,3 +221,4 @@ func scanDebs(root string, count int) ([]DebInfo, error) { }) return debs, err } +*/ -- cgit v1.2.3