From f7d6def397205c87aaac119b16ac746e990aab1f Mon Sep 17 00:00:00 2001
From: flu0r1ne <flu0r1ne@flu0r1ne.net>
Date: Tue, 31 Aug 2021 00:23:45 -0500
Subject: Reapply patches

---
 debian/patches/golang-1.3-compat                   | 23 ----------------------
 debian/patches/golang-1.3-compat-readdir           | 23 ++++++++++++++++++++++
 .../golang-1.3-compat-remove-prefix-logging        | 14 +++++++++++++
 debian/patches/series                              |  3 ++-
 4 files changed, 39 insertions(+), 24 deletions(-)
 delete mode 100644 debian/patches/golang-1.3-compat
 create mode 100644 debian/patches/golang-1.3-compat-readdir
 create mode 100644 debian/patches/golang-1.3-compat-remove-prefix-logging

diff --git a/debian/patches/golang-1.3-compat b/debian/patches/golang-1.3-compat
deleted file mode 100644
index f157402..0000000
--- a/debian/patches/golang-1.3-compat
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: planr/fs.go
-===================================================================
---- planr.orig/fs.go
-+++ planr/fs.go
-@@ -220,7 +220,7 @@ func collectFromDir(
- 
-   // Read the entries in this directory
-   for {
--    dirs, err := fp.ReadDir(100)
-+    dirs, err := fp.Readdir(100)
-     if err == io.EOF {
-       break
-     } else if err != nil {
-@@ -229,8 +229,8 @@ func collectFromDir(
- 
- 
-     for _, ent := range dirs {
--      child := path.Join(dir, ent.Name())
-       nm := ent.Name()
-+      child := path.Join(dir, nm)
- 
-       if ent.IsDir() {
-         collectFromDir(child, defaults, cfgs, units)
diff --git a/debian/patches/golang-1.3-compat-readdir b/debian/patches/golang-1.3-compat-readdir
new file mode 100644
index 0000000..b9e5c6d
--- /dev/null
+++ b/debian/patches/golang-1.3-compat-readdir
@@ -0,0 +1,23 @@
+Index: planr/fs.go
+===================================================================
+--- planr.orig/fs.go
++++ planr/fs.go
+@@ -224,7 +224,7 @@ func collectFromDir(
+ 
+   // Read the entries in this directory
+   for {
+-    dirs, err := fp.ReadDir(100)
++    dirs, err := fp.Readdir(100)
+     if err == io.EOF {
+       break
+     } else if err != nil {
+@@ -233,8 +233,8 @@ func collectFromDir(
+ 
+ 
+     for _, ent := range dirs {
+-      child := path.Join(dir, ent.Name())
+       nm := ent.Name()
++      child := path.Join(dir, nm)
+ 
+       if ent.IsDir() {
+         collectFromDir(child, defaults, cfgs, units)
diff --git a/debian/patches/golang-1.3-compat-remove-prefix-logging b/debian/patches/golang-1.3-compat-remove-prefix-logging
new file mode 100644
index 0000000..08a1a9e
--- /dev/null
+++ b/debian/patches/golang-1.3-compat-remove-prefix-logging
@@ -0,0 +1,14 @@
+Index: planr/cmd/planr/main.go
+===================================================================
+--- planr.orig/cmd/planr/main.go
++++ planr/cmd/planr/main.go
+@@ -28,8 +28,7 @@ func dieUsage() {
+ 
+ func main() {
+ 
+-        log.SetFlags(log.Llongfile | log.Lmsgprefix)
+-        log.SetPrefix("planr: ")
++        log.SetFlags(log.Llongfile)
+ 
+ 	if len(os.Args) < 2 {
+ 	  dieUsage()
diff --git a/debian/patches/series b/debian/patches/series
index 7cd5d69..a80079f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-golang-1.3-compat
+golang-1.3-compat-readdir
+golang-1.3-compat-remove-prefix-logging
-- 
cgit v1.2.3